How can i switch between appearance props with onPress
? exampe: Default -> Active -> Background -> Default. in AppearanceButton
file i have these three props
appearance?: "default" | "active" | "background"
These props control the color of my AppearnceButton, how can i switch between the appearance props onPress?
function onPressSwitchAppearance() {
{
//How to switch between the appearance props onPress?
}
}
<View>
<AppearnceButton onPress={onPressSwitchAppearance} appearance="default" icon="icon1" />
</View>