7.0.6 • Published 2 months ago
@capacitor/native-action-sheet
Capacitor plugin for the native action sheet dialog
Install
npm install @capacitor/native-action-sheet
npx cap sync
API
open(...)
open(options: NativeActionSheetOptions) => Promise<NativeActionSheetResponse>
Open new action sheet
Param | Type | Description |
---|
options | NativeActionSheetOptions | Options for the actionsheet |
Returns: Promise<NativeActionSheetResponse>
Interfaces
NativeActionSheetResponse
Prop | Type | Description |
---|
cancelled | boolean | Was the cancel button pressed |
selectedItem | number | Selected item index (starting from null) |
NativeActionSheetOptions
Prop | Type | Description |
---|
items | NativeActionSheetItem[] | Items for the action sheet |
theme | number | Theme number (android only) |
cancelable | boolean | Is the action sheet cancelable |
cancelableLabel | string | Label for cancel button |
NativeActionSheetItem
Prop | Type | Description |
---|
label | string | Label for item |
style | NativeActionSheetStyle | Style for the item (iOS only) |
disabled | boolean | Is the item disabled |
Enums
NativeActionSheetStyle
Members | Value |
---|
DEFAULT | "DEFAULT" |
DESTRUCTIVE | "DESTRUCTIVE" |