1e41f4b71Sopenharmony_ci# Action Sheet (ActionSheet) 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ciAn action sheet is a dialog box that displays actions a user can take. 4e41f4b71Sopenharmony_ci 5e41f4b71Sopenharmony_ci> **NOTE** 6e41f4b71Sopenharmony_ci> 7e41f4b71Sopenharmony_ci> The APIs of this module are supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version. 8e41f4b71Sopenharmony_ci> 9e41f4b71Sopenharmony_ci> The functionality of this module depends on UI context. This means that the APIs of this module cannot be used where the UI context is unclear. For details, see [UIContext](../js-apis-arkui-UIContext.md#uicontext). 10e41f4b71Sopenharmony_ci> 11e41f4b71Sopenharmony_ci> Since API version 10, you can use the [showActionSheet](../js-apis-arkui-UIContext.md#showactionsheet) API in [UIContext](../js-apis-arkui-UIContext.md#uicontext) to obtain the UI context. 12e41f4b71Sopenharmony_ci 13e41f4b71Sopenharmony_ci## ActionSheet.show 14e41f4b71Sopenharmony_ci 15e41f4b71Sopenharmony_cistatic show(value: ActionSheetOptions) 16e41f4b71Sopenharmony_ci 17e41f4b71Sopenharmony_ciShows an action sheet in the given settings. 18e41f4b71Sopenharmony_ci 19e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 11. 20e41f4b71Sopenharmony_ci 21e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full 22e41f4b71Sopenharmony_ci 23e41f4b71Sopenharmony_ci**Parameters** 24e41f4b71Sopenharmony_ci 25e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description. | 26e41f4b71Sopenharmony_ci| ------ | ------------------------------------------------- | ---- | ------------------------ | 27e41f4b71Sopenharmony_ci| value | [ActionSheetOptions](#actionsheetoptions) | Yes | Parameters of the action sheet.| 28e41f4b71Sopenharmony_ci 29e41f4b71Sopenharmony_ci## ActionSheetOptions 30e41f4b71Sopenharmony_ci 31e41f4b71Sopenharmony_ci| Name | Type | Mandatory | Description | 32e41f4b71Sopenharmony_ci| ---------- | -------------------------- | ------- | ----------------------------- | 33e41f4b71Sopenharmony_ci| title | [Resource](ts-types.md#resource) \| string | Yes | Title of the dialog box.<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 34e41f4b71Sopenharmony_ci| subtitle<sup>10+</sup> | [ResourceStr](ts-types.md#resourcestr) | No| Subtitle of the dialog box.<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 35e41f4b71Sopenharmony_ci| message | [Resource](ts-types.md#resource) \| string | Yes | Content of the dialog box.<br>**Atomic service API**: This API can be used in atomic services since API version 11. | 36e41f4b71Sopenharmony_ci| autoCancel | boolean | No | Whether to close the dialog box when the overlay is clicked.<br>Default value: **true**<br>The value **true** means to close the dialog box when the overlay is clicked, and **false** means the opposite.<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 37e41f4b71Sopenharmony_ci| confirm | {<br>enabled<sup>10+</sup>?: boolean,<br>defaultFocus<sup>10+</sup>?: boolean,<br>style<sup>10+</sup>?: [DialogButtonStyle](#dialogbuttonstyle10),<br>value: [Resource](ts-types.md#resource) \| string,<br>action: () => void<br>} | No | Information about the confirm button. When the dialog box has focus and the **Tab** key is not pressed for sequential focus navigation, the button responds to the **Enter** key by default.<br>**enabled**: whether the button responds to clicks. The value **true** means that the button responds to clicks, and **false** means the opposite.<br>Default value: **true**<br>**defaultFocus**: whether the button is the default focus. The value **true** means that the button is the default focus, and **false** means the opposite.<br>Default value: **false**<br>**style**: button style.<br>Default value: **DialogButtonStyle.DEFAULT**<br>**value**: button text.<br>**action**: callback upon button clicking.<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 38e41f4b71Sopenharmony_ci| cancel | () => void | No | Callback invoked when the dialog box is closed after the overlay is clicked.<br>**Atomic service API**: This API can be used in atomic services since API version 11. | 39e41f4b71Sopenharmony_ci| alignment | [DialogAlignment](ts-methods-alert-dialog-box.md#dialogalignment) | No | Alignment mode of the dialog box in the vertical direction.<br>Default value: **DialogAlignment.Bottom**<br>**Atomic service API**: This API can be used in atomic services since API version 11.<br>**NOTE**<br>If **showInSubWindow** is set to **true** in **UIExtension**, the dialog box is aligned with the host window based on **UIExtension**.| 40e41f4b71Sopenharmony_ci| offset | {<br>dx: number \| string \| [Resource](ts-types.md#resource),<br>dy: number \| string \| [Resource](ts-types.md#resource)<br>} | No | Offset of the dialog box relative to the alignment position.<br>Default value:<br>1. When alignment is set to **Top**, **TopStart**, or **TopEnd**: {dx: 0,dy: "40vp"}<br>2. When **alignment** is set to any other value: {dx: 0,dy: "-40vp"}<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 41e41f4b71Sopenharmony_ci| sheets | Array<[SheetInfo](#sheetinfo)> | Yes | Options in the dialog box. Each option supports the image, text, and callback.<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 42e41f4b71Sopenharmony_ci| maskRect<sup>10+</sup> | [Rectangle](ts-methods-alert-dialog-box.md#rectangle8) | No | Mask area of the dialog box. Events outside the mask area are transparently transmitted, and events within the mask area are not.<br>Default value: **{ x: 0, y: 0, width: '100%', height: '100%' }**<br>**NOTE**<br>**maskRect** does not take effect when **showInSubWindow** is set to **true**.<br>**Atomic service API**: This API can be used in atomic services since API version 12.| 43e41f4b71Sopenharmony_ci| showInSubWindow<sup>11+</sup> | boolean | No| Whether to show the dialog box in a sub-window when the dialog box needs to be displayed outside the main window.<br>Default value: **false**<br>**NOTE**<br>A dialog box whose **showInSubWindow** attribute is **true** cannot trigger the display of another dialog box whose **showInSubWindow** attribute is also **true**.<br>**Atomic service API**: This API can be used in atomic services since API version 12.| 44e41f4b71Sopenharmony_ci| isModal<sup>11+</sup> | boolean | No| Whether the dialog box is a modal. A modal dialog box has a mask applied, while a non-modal dialog box does not.<br>Default value: **true**<br>**Atomic service API**: This API can be used in atomic services since API version 12.| 45e41f4b71Sopenharmony_ci| backgroundColor<sup>11+</sup> | [ResourceColor](ts-types.md#resourcecolor) | No| Background color of the dialog box.<br>Default value: **Color.Transparent**<br>**Atomic service API**: This API can be used in atomic services since API version 12.| 46e41f4b71Sopenharmony_ci| backgroundBlurStyle<sup>11+</sup> | [BlurStyle](ts-appendix-enums.md#blurstyle9) | No| Background blur style of the dialog box.<br>Default value: **BlurStyle.COMPONENT_ULTRA_THICK**<br>**Atomic service API**: This API can be used in atomic services since API version 12.| 47e41f4b71Sopenharmony_ci| onWillDismiss<sup>12+</sup> | Callback<[DismissDialogAction](ts-methods-alert-dialog-box.md#dismissdialogaction12)> | No| Callback for interactive closure of the dialog box.<br>**NOTE**<br>1. If this callback is registered, the dialog box will not be closed immediately after the user touches the mask or the Back button, presses the Esc key, or swipes left or right on the screen. The **reason** parameter in the callback is used to determine whether the dialog box can be closed. The reason returned by the component does not support the value **CLOSE_BUTTON**.<br>2. In the **onWillDismiss** callback, another **onWillDismiss** callback is not allowed.| 48e41f4b71Sopenharmony_ci| cornerRadius<sup>12+</sup> | [BorderRadiuses](ts-types.md#borderradiuses9) \| [Dimension](ts-types.md#dimension10) | No| Radius of the rounded corners of the background.<br>You can set separate radiuses for the four rounded corners.<br>Default value: **{ topLeft: '32vp', topRight: '32vp', bottomLeft: '32vp', bottomRight: '32vp' }**<br> The radius of the rounded corners is subject to the component size. Its maximum value is half of the component width or height. If the value is negative, the default value is used.<br> When set to a percentage, the value defines the radius as a percentage of the parent component's width or height.| 49e41f4b71Sopenharmony_ci| borderWidth<sup>12+</sup> | [Dimension](ts-types.md#dimension10) \| [EdgeWidths](ts-types.md#edgewidths9) | No| Border width of the dialog box.<br>You can set the width for all four sides or set separate widths for individual sides.<br>Default value: **0**<br> When set to a percentage, the value defines the border width as a percentage of the parent dialog box's width.<br>If the left and right borders are greater than its width, or the top and bottom borders are greater than its height, the dialog box may not display as expected.| 50e41f4b71Sopenharmony_ci| borderColor<sup>12+</sup> | [ResourceColor](ts-types.md#resourcecolor) \| [EdgeColors](ts-types.md#edgecolors9) | No| Border color of the dialog box.<br>Default value: **Color.Black**<br> **borderColor** must be used with **borderWidth** in pairs.| 51e41f4b71Sopenharmony_ci| borderStyle<sup>12+</sup> | [BorderStyle](ts-appendix-enums.md#borderstyle) \| [EdgeStyles](ts-types.md#edgestyles9) | No| Border style of the dialog box.<br>Default value: **BorderStyle.Solid**<br> **borderStyle** must be used with **borderWidth** in pairs.| 52e41f4b71Sopenharmony_ci| width<sup>12+</sup> | [Dimension](ts-types.md#dimension10) | No| Width of the dialog box.<br>**NOTE**<br>- Default maximum width of the dialog box: 400 vp<br>- When this parameter is set to a percentage, the reference width of the dialog box is the width of the window where the dialog box is located. You can decrease or increase the width as needed.| 53e41f4b71Sopenharmony_ci| height<sup>12+</sup> | [Dimension](ts-types.md#dimension10) | No| Height of the dialog box.<br>**NOTE**<br>- Default maximum height of the dialog box: 0.9 x (Window height – Safe area)<br>- When this parameter is set to a percentage, the reference height of the dialog box is the height of the window where the dialog box is located minus the safe area. You can decrease or increase the height as needed.| 54e41f4b71Sopenharmony_ci| shadow<sup>12+</sup> | [ShadowOptions](ts-universal-attributes-image-effect.md#shadowoptions) \| [ShadowStyle](ts-universal-attributes-image-effect.md#shadowstyle10) | No| Shadow of the dialog box.<br> Default value on 2-in-1 devices: **ShadowStyle.OUTER_FLOATING_MD** when the dialog box is focused and **ShadowStyle.OUTER_FLOATING_SM** otherwise| 55e41f4b71Sopenharmony_ci| transition<sup>12+</sup> | [TransitionEffect](ts-transition-animation-component.md#transitioneffect10) | No| Transition effect for the entrance and exit of the dialog box.<br>**NOTE**<br>1. If this parameter is not set, the default effect is used.<br>2. Touching the Back button during the entrance animation pauses the entrance animation and starts the exit animation. The final effect is one obtained after the curves of the entrance and exit animations are combined.<br>3. Touching the Back button during the exit animation does not affect the animation playback. Touching the Back button again closes the application.| 56e41f4b71Sopenharmony_ci## SheetInfo 57e41f4b71Sopenharmony_ci 58e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 11. 59e41f4b71Sopenharmony_ci 60e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 61e41f4b71Sopenharmony_ci| ------ | ------------------------------------------------------------ | ---- | ----------------- | 62e41f4b71Sopenharmony_ci| title | string \| [Resource](ts-types.md#resource) | Yes | Sheet text. | 63e41f4b71Sopenharmony_ci| icon | string \| [Resource](ts-types.md#resource) | No | Sheet icon. By default, no icon is displayed. | 64e41f4b71Sopenharmony_ci| action | ()=>void | Yes | Callback when the sheet is selected.| 65e41f4b71Sopenharmony_ci 66e41f4b71Sopenharmony_ci## DialogButtonStyle<sup>10+</sup> 67e41f4b71Sopenharmony_ci 68e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 11. 69e41f4b71Sopenharmony_ci 70e41f4b71Sopenharmony_ci| Name | Description. | 71e41f4b71Sopenharmony_ci| --------- | --------------------------------- | 72e41f4b71Sopenharmony_ci| DEFAULT | Blue text on white background (black background under the dark theme).| 73e41f4b71Sopenharmony_ci| HIGHLIGHT | White text on blue background. | 74e41f4b71Sopenharmony_ci 75e41f4b71Sopenharmony_ci## Example 76e41f4b71Sopenharmony_ci 77e41f4b71Sopenharmony_ci### Example 1 78e41f4b71Sopenharmony_ci 79e41f4b71Sopenharmony_ci```ts 80e41f4b71Sopenharmony_ci@Entry 81e41f4b71Sopenharmony_ci@Component 82e41f4b71Sopenharmony_cistruct ActionSheetExample { 83e41f4b71Sopenharmony_ci build() { 84e41f4b71Sopenharmony_ci Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { 85e41f4b71Sopenharmony_ci Button('Click to Show ActionSheet') 86e41f4b71Sopenharmony_ci .onClick(() => { 87e41f4b71Sopenharmony_ci ActionSheet.show({ 88e41f4b71Sopenharmony_ci title: 'ActionSheet title', 89e41f4b71Sopenharmony_ci subtitle: 'ActionSheet subtitle', 90e41f4b71Sopenharmony_ci message: 'message', 91e41f4b71Sopenharmony_ci autoCancel: true, 92e41f4b71Sopenharmony_ci confirm: { 93e41f4b71Sopenharmony_ci defaultFocus: true, 94e41f4b71Sopenharmony_ci value: 'Confirm button', 95e41f4b71Sopenharmony_ci action: () => { 96e41f4b71Sopenharmony_ci console.log('Get Alert Dialog handled') 97e41f4b71Sopenharmony_ci } 98e41f4b71Sopenharmony_ci }, 99e41f4b71Sopenharmony_ci cancel: () => { 100e41f4b71Sopenharmony_ci console.log('actionSheet canceled') 101e41f4b71Sopenharmony_ci }, 102e41f4b71Sopenharmony_ci onWillDismiss:(dismissDialogAction: DismissDialogAction)=> { 103e41f4b71Sopenharmony_ci console.info("reason=" + JSON.stringify(dismissDialogAction.reason)) 104e41f4b71Sopenharmony_ci console.log("dialog onWillDismiss") 105e41f4b71Sopenharmony_ci if (dismissDialogAction.reason == DismissReason.PRESS_BACK) { 106e41f4b71Sopenharmony_ci dismissDialogAction.dismiss() 107e41f4b71Sopenharmony_ci } 108e41f4b71Sopenharmony_ci if (dismissDialogAction.reason == DismissReason.TOUCH_OUTSIDE) { 109e41f4b71Sopenharmony_ci dismissDialogAction.dismiss() 110e41f4b71Sopenharmony_ci } 111e41f4b71Sopenharmony_ci }, 112e41f4b71Sopenharmony_ci alignment: DialogAlignment.Bottom, 113e41f4b71Sopenharmony_ci offset: { dx: 0, dy: -10 }, 114e41f4b71Sopenharmony_ci sheets: [ 115e41f4b71Sopenharmony_ci { 116e41f4b71Sopenharmony_ci title: 'apples', 117e41f4b71Sopenharmony_ci action: () => { 118e41f4b71Sopenharmony_ci console.log('apples') 119e41f4b71Sopenharmony_ci } 120e41f4b71Sopenharmony_ci }, 121e41f4b71Sopenharmony_ci { 122e41f4b71Sopenharmony_ci title: 'bananas', 123e41f4b71Sopenharmony_ci action: () => { 124e41f4b71Sopenharmony_ci console.log('bananas') 125e41f4b71Sopenharmony_ci } 126e41f4b71Sopenharmony_ci }, 127e41f4b71Sopenharmony_ci { 128e41f4b71Sopenharmony_ci title: 'pears', 129e41f4b71Sopenharmony_ci action: () => { 130e41f4b71Sopenharmony_ci console.log('pears') 131e41f4b71Sopenharmony_ci } 132e41f4b71Sopenharmony_ci } 133e41f4b71Sopenharmony_ci ] 134e41f4b71Sopenharmony_ci }) 135e41f4b71Sopenharmony_ci }) 136e41f4b71Sopenharmony_ci }.width('100%') 137e41f4b71Sopenharmony_ci .height('100%') 138e41f4b71Sopenharmony_ci } 139e41f4b71Sopenharmony_ci} 140e41f4b71Sopenharmony_ci``` 141e41f4b71Sopenharmony_ci 142e41f4b71Sopenharmony_ci 143e41f4b71Sopenharmony_ci 144e41f4b71Sopenharmony_ci### Example 2 145e41f4b71Sopenharmony_ci 146e41f4b71Sopenharmony_ci```ts 147e41f4b71Sopenharmony_ci@Entry 148e41f4b71Sopenharmony_ci@Component 149e41f4b71Sopenharmony_cistruct ActionSheetExample { 150e41f4b71Sopenharmony_ci build() { 151e41f4b71Sopenharmony_ci Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { 152e41f4b71Sopenharmony_ci Button('Click to Show ActionSheet') 153e41f4b71Sopenharmony_ci .onClick(() => { 154e41f4b71Sopenharmony_ci ActionSheet.show({ 155e41f4b71Sopenharmony_ci title: 'ActionSheet title', 156e41f4b71Sopenharmony_ci subtitle: 'ActionSheet subtitle', 157e41f4b71Sopenharmony_ci message: 'message', 158e41f4b71Sopenharmony_ci autoCancel: true, 159e41f4b71Sopenharmony_ci showInSubWindow: true, 160e41f4b71Sopenharmony_ci isModal: true, 161e41f4b71Sopenharmony_ci confirm: { 162e41f4b71Sopenharmony_ci defaultFocus: true, 163e41f4b71Sopenharmony_ci value: 'Confirm button', 164e41f4b71Sopenharmony_ci action: () => { 165e41f4b71Sopenharmony_ci console.log('Get Alert Dialog handled') 166e41f4b71Sopenharmony_ci } 167e41f4b71Sopenharmony_ci }, 168e41f4b71Sopenharmony_ci cancel: () => { 169e41f4b71Sopenharmony_ci console.log('actionSheet canceled') 170e41f4b71Sopenharmony_ci }, 171e41f4b71Sopenharmony_ci onWillDismiss:(dismissDialogAction: DismissDialogAction)=> { 172e41f4b71Sopenharmony_ci console.info("reason=" + JSON.stringify(dismissDialogAction.reason)) 173e41f4b71Sopenharmony_ci console.log("dialog onWillDismiss") 174e41f4b71Sopenharmony_ci if (dismissDialogAction.reason == DismissReason.PRESS_BACK) { 175e41f4b71Sopenharmony_ci dismissDialogAction.dismiss() 176e41f4b71Sopenharmony_ci } 177e41f4b71Sopenharmony_ci if (dismissDialogAction.reason == DismissReason.TOUCH_OUTSIDE) { 178e41f4b71Sopenharmony_ci dismissDialogAction.dismiss() 179e41f4b71Sopenharmony_ci } 180e41f4b71Sopenharmony_ci }, 181e41f4b71Sopenharmony_ci alignment: DialogAlignment.Center, 182e41f4b71Sopenharmony_ci offset: { dx: 0, dy: -10 }, 183e41f4b71Sopenharmony_ci sheets: [ 184e41f4b71Sopenharmony_ci { 185e41f4b71Sopenharmony_ci title: 'apples', 186e41f4b71Sopenharmony_ci action: () => { 187e41f4b71Sopenharmony_ci console.log('apples') 188e41f4b71Sopenharmony_ci } 189e41f4b71Sopenharmony_ci }, 190e41f4b71Sopenharmony_ci { 191e41f4b71Sopenharmony_ci title: 'bananas', 192e41f4b71Sopenharmony_ci action: () => { 193e41f4b71Sopenharmony_ci console.log('bananas') 194e41f4b71Sopenharmony_ci } 195e41f4b71Sopenharmony_ci }, 196e41f4b71Sopenharmony_ci { 197e41f4b71Sopenharmony_ci title: 'pears', 198e41f4b71Sopenharmony_ci action: () => { 199e41f4b71Sopenharmony_ci console.log('pears') 200e41f4b71Sopenharmony_ci } 201e41f4b71Sopenharmony_ci } 202e41f4b71Sopenharmony_ci ] 203e41f4b71Sopenharmony_ci }) 204e41f4b71Sopenharmony_ci }) 205e41f4b71Sopenharmony_ci }.width('100%') 206e41f4b71Sopenharmony_ci .height('100%') 207e41f4b71Sopenharmony_ci } 208e41f4b71Sopenharmony_ci} 209e41f4b71Sopenharmony_ci``` 210e41f4b71Sopenharmony_ci 211e41f4b71Sopenharmony_ci 212e41f4b71Sopenharmony_ci 213e41f4b71Sopenharmony_ci### Example 3 214e41f4b71Sopenharmony_ciThis example sets a 3s entrance animation and a 100 ms exit animation for the action sheet. 215e41f4b71Sopenharmony_ci```ts 216e41f4b71Sopenharmony_ciimport router from '@ohos.router'; 217e41f4b71Sopenharmony_ci@Entry 218e41f4b71Sopenharmony_ci@Component 219e41f4b71Sopenharmony_cistruct ActionSheetExample { 220e41f4b71Sopenharmony_ci build() { 221e41f4b71Sopenharmony_ci Column({ space: 5 }) { 222e41f4b71Sopenharmony_ci Button('ActionSheet Set Duration') 223e41f4b71Sopenharmony_ci .onClick(() => { 224e41f4b71Sopenharmony_ci ActionSheet.show({ 225e41f4b71Sopenharmony_ci title: 'ActionSheet 1', 226e41f4b71Sopenharmony_ci message: 'Set Animation Duration open 3 second, close 100 ms', 227e41f4b71Sopenharmony_ci autoCancel: true, 228e41f4b71Sopenharmony_ci alignment: DialogAlignment.Top, 229e41f4b71Sopenharmony_ci transition:TransitionEffect.asymmetric(TransitionEffect.OPACITY 230e41f4b71Sopenharmony_ci .animation({ duration: 3000, curve: Curve.Sharp }).combine(TransitionEffect.scale({x: 1.5, y: 1.5}).animation({duration: 3000, curve: Curve.Sharp})), 231e41f4b71Sopenharmony_ci TransitionEffect.OPACITY.animation({ duration: 100, curve: Curve.Smooth }) 232e41f4b71Sopenharmony_ci .combine(TransitionEffect.scale({x: 0.5, y: 0.5}).animation({duration: 100, curve: Curve.Smooth}))), 233e41f4b71Sopenharmony_ci offset: { dx: 0, dy: -20 }, 234e41f4b71Sopenharmony_ci confirm: { 235e41f4b71Sopenharmony_ci value: 'button', 236e41f4b71Sopenharmony_ci action: () => { 237e41f4b71Sopenharmony_ci console.info('Button-clicking callback') 238e41f4b71Sopenharmony_ci } 239e41f4b71Sopenharmony_ci }, 240e41f4b71Sopenharmony_ci cancel: () => { 241e41f4b71Sopenharmony_ci console.info('Closed callbacks') 242e41f4b71Sopenharmony_ci }, 243e41f4b71Sopenharmony_ci sheets: [ 244e41f4b71Sopenharmony_ci { 245e41f4b71Sopenharmony_ci title: 'apples', 246e41f4b71Sopenharmony_ci action: () => { 247e41f4b71Sopenharmony_ci console.log('apples') 248e41f4b71Sopenharmony_ci } 249e41f4b71Sopenharmony_ci }, 250e41f4b71Sopenharmony_ci { 251e41f4b71Sopenharmony_ci title: 'bananas', 252e41f4b71Sopenharmony_ci action: () => { 253e41f4b71Sopenharmony_ci console.log('bananas') 254e41f4b71Sopenharmony_ci } 255e41f4b71Sopenharmony_ci }, 256e41f4b71Sopenharmony_ci { 257e41f4b71Sopenharmony_ci title: 'pears', 258e41f4b71Sopenharmony_ci action: () => { 259e41f4b71Sopenharmony_ci console.log('pears') 260e41f4b71Sopenharmony_ci } 261e41f4b71Sopenharmony_ci } 262e41f4b71Sopenharmony_ci ] 263e41f4b71Sopenharmony_ci }) 264e41f4b71Sopenharmony_ci }).backgroundColor(0x317aff).height("88px") 265e41f4b71Sopenharmony_ci }.width('100%').margin({ top: 5 }) 266e41f4b71Sopenharmony_ci } 267e41f4b71Sopenharmony_ci} 268e41f4b71Sopenharmony_ci``` 269e41f4b71Sopenharmony_ci 270e41f4b71Sopenharmony_ci 271