TouchableOpacity
A wrapper for TouchableOpacity component. Support onPress, throttling and activeBackgroundColor
(code example)
This component extends TouchableOpacity props.
This component support margins, paddings, alignments, background, borderRadius modifiers.
Usageβ
<TouchableOpacity onPress={() => console.log('pressed')}><Text text40>Click Me!</Text></TouchableOpacity>
APIβ
activeBackgroundColorβ
Apply background color on TouchableOpacity when active (press is on)
string
backgroundColorβ
Background color for TouchableOpacity
string
customValueβ
Custom value of any type to pass on to TouchableOpacity and receive back in onPress callback
any
onPressβ
On press callback
(props?: TouchableOpacityProps & {event: GestureResponderEvent} | any) => void
recorderTagβ
Recorder Tag
'mask' | 'unmask'
styleβ
Custom style
ViewStyle
throttleOptionsβ
Throttle options
ThrottleOptions
throttleTimeβ
Throttle time in MS for onPress callback
number
useNativeβ
Should use an enhanced native implementation with extra features
boolean