ActionSheet
Cross platform Action sheet, with a support for native iOS solution
PROPS
name | description | type | default |
---|---|---|---|
visible | Whether to show the action sheet or not | bool | |
title | Title of the action sheet. Note: if both title and message are not passed will not render the title view at all | string | undefined |
message | Message of the action sheet | string | undefined |
cancelButtonIndex | Index of the option represents the cancel action (to be displayed as the separated bottom bold button) | number | |
destructiveButtonIndex | Index of the option represents the destructive action (will display red text. Usually used for 'delete' or 'abort' actions) | number | |
options | List of options for the action sheet, follows the Button prop types (supply 'label' string and 'onPress' function) | arrayOf | |
onDismiss | callback for when dismissing the action sheet, usually used for setting visible prop to false | func | |
useNativeIOS | Should use the native action sheet for iOS | bool | |
showCancelButton | When passed (only with useNativeIOS), will display a cancel button at the bottom (overrides cancelButtonIndex) | bool | false |
LIVE EXAMPLE
CODE SAMPLE
See example here.