Skip to main content

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

NameTypeDefaultDescription
titlestring | undefined-Tiêu đề của action sheet
buttonTitlestring-Tiêu đề của butston toggle
childrenReactNode-Nội dung hiển thị trong action sheet
itemsActionSheetItems[]-Danh sách các item trong action sheet. Tương tự của ActionListItemDescriptor Polaris Action list