Action sheet
Action sheet dùng để thực hiện các hành động select từ popOver với content children hiển thị trong sheet
Ví dụ
import { ActionSheet } from '@xobuilder/ui';
import type { ActionSheetItems } from '@xobuilder/ui';
const Demo: FC = () => {
const items: ActionSheetItems[] = [
{ content: 'Change collection', icon: ExchangeMajor, onAction: () => {} },
{ content: 'Remove collection', icon: DeleteMajor, onAction: () => {} },
];
return (
<ActionSheet title="Pick collection" buttonTitle="Change" items={items}>
Sheet content here
</ActionSheet>
)
}
Props
Name | Type | Default | Description |
---|---|---|---|
title | string | undefined | - | Tiêu đề của action sheet |
buttonTitle | string | - | Tiêu đề của butston toggle |
children | ReactNode | - | Nội dung hiển thị trong action sheet |
items | ActionSheetItems[] | - | Danh sách các item trong action sheet. Tương tự của ActionListItemDescriptor Polaris Action list |