2022-11-04 15:40:46 +00:00
|
|
|
import { Canvas, Meta, Story, ArgsTable } from '@storybook/addon-docs';
|
2023-01-04 13:05:00 +00:00
|
|
|
import { Examples, Example, Note, Title,CustomArgsTable,VariantsTable,VariantRow } from '@calcom/storybook/components'
|
2023-01-26 22:51:03 +00:00
|
|
|
import { FiTrash, FiNavigation, FiClipboard } from '../icon';
|
2022-11-04 15:40:46 +00:00
|
|
|
import { ButtonGroup} from './ButtonGroup';
|
|
|
|
import { Button} from '../button/Button';
|
|
|
|
|
|
|
|
<Meta title="UI/Button Group" component={ButtonGroup} />
|
|
|
|
|
|
|
|
<Title title="Button Group" suffix="Brief" subtitle="Version 2.0 — Last Update: 22 Aug 2022"/>
|
|
|
|
|
|
|
|
## Definition
|
|
|
|
Button group enables multiple buttons to be combined into a single unit. It offers users access to frequently performed, related actions.
|
|
|
|
|
|
|
|
## Structure
|
|
|
|
|
|
|
|
<CustomArgsTable of={ButtonGroup} />
|
|
|
|
|
|
|
|
|
|
|
|
<Examples title="Breadcrumb style"
|
|
|
|
footNote ={
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
Seperated: In general, seperated button group style can be included in container such as card, modal, and page.
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
Combined: Combined button group can be used standalone e.g. mini toggles for calendars
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<Example title="Default" >
|
|
|
|
<ButtonGroup>
|
2023-01-23 23:08:01 +00:00
|
|
|
<Button StartIcon={FiTrash} variant="icon" color="secondary" />
|
|
|
|
<Button StartIcon={FiNavigation} variant="icon" color="secondary" />
|
|
|
|
<Button StartIcon={FiClipboard} variant="icon" color="secondary" />
|
2022-11-04 15:40:46 +00:00
|
|
|
</ButtonGroup>
|
|
|
|
</Example>
|
|
|
|
<Example title="Combined">
|
|
|
|
<ButtonGroup combined>
|
2023-01-23 23:08:01 +00:00
|
|
|
<Button StartIcon={FiTrash} variant="icon" color="secondary" />
|
|
|
|
<Button StartIcon={FiNavigation} variant="icon" color="secondary" />
|
|
|
|
<Button StartIcon={FiClipboard} variant="icon" color="secondary" />
|
2022-11-04 15:40:46 +00:00
|
|
|
</ButtonGroup>
|
|
|
|
</Example>
|
|
|
|
</Examples>
|
|
|
|
|
|
|
|
|
|
|
|
<Canvas>
|
|
|
|
<Story
|
|
|
|
name="All Variatns">
|
|
|
|
<VariantsTable titles={["Default",'Secondary',"Minimal"]} columnMinWidth={150}>
|
|
|
|
<VariantRow variant="Default">
|
|
|
|
<ButtonGroup>
|
2023-01-23 23:08:01 +00:00
|
|
|
<Button StartIcon={FiTrash} variant="icon" />
|
|
|
|
<Button StartIcon={FiNavigation} variant="icon"/>
|
|
|
|
<Button StartIcon={FiClipboard} variant="icon" />
|
2022-11-04 15:40:46 +00:00
|
|
|
</ButtonGroup>
|
|
|
|
<ButtonGroup>
|
2023-01-23 23:08:01 +00:00
|
|
|
<Button StartIcon={FiTrash} variant="icon" color="secondary" />
|
|
|
|
<Button StartIcon={FiNavigation} variant="icon" color="secondary" />
|
|
|
|
<Button StartIcon={FiClipboard} variant="icon" color="secondary" />
|
2022-11-04 15:40:46 +00:00
|
|
|
</ButtonGroup>
|
|
|
|
<ButtonGroup>
|
2023-01-23 23:08:01 +00:00
|
|
|
<Button StartIcon={FiTrash} variant="icon" color="minimal" />
|
|
|
|
<Button StartIcon={FiNavigation} variant="icon" color="minimal" />
|
|
|
|
<Button StartIcon={FiClipboard} variant="icon" color="minimal" />
|
2022-11-04 15:40:46 +00:00
|
|
|
</ButtonGroup>
|
|
|
|
</VariantRow>
|
|
|
|
<VariantRow variant="Combined">
|
|
|
|
<ButtonGroup combined>
|
2023-01-23 23:08:01 +00:00
|
|
|
<Button StartIcon={FiTrash} variant="icon" />
|
|
|
|
<Button StartIcon={FiNavigation} variant="icon" />
|
|
|
|
<Button StartIcon={FiClipboard} variant="icon" />
|
2022-11-04 15:40:46 +00:00
|
|
|
</ButtonGroup>
|
|
|
|
<ButtonGroup combined>
|
2023-01-23 23:08:01 +00:00
|
|
|
<Button StartIcon={FiTrash} variant="icon" color="secondary" />
|
|
|
|
<Button StartIcon={FiNavigation} variant="icon" color="secondary" />
|
|
|
|
<Button StartIcon={FiClipboard} variant="icon" color="secondary" />
|
2022-11-04 15:40:46 +00:00
|
|
|
</ButtonGroup>
|
|
|
|
</VariantRow>
|
|
|
|
</VariantsTable>
|
|
|
|
</Story>
|
|
|
|
</Canvas>
|