chore: prettier
This commit is contained in:
1 parent
aa5e2ac9a5
commit
8071016848
57 files changed
+1309
-1090
No files matched your search
@@ -1,34 +1,43 @@
|
||||
import { Canvas, Meta, Story, ArgsTable } from '@storybook/addon-docs';
|
||||
import { Examples, Example, Note, Title,CustomArgsTable,VariantsTable,VariantRow } from '@calcom/storybook/components'
|
||||
import { Trash, Navigation, Clipboard } from '../icon';
|
||||
import { ButtonGroup} from './ButtonGroup';
|
||||
import { Button} from '../button/Button';
|
||||
import { Canvas, Meta, Story, ArgsTable } from "@storybook/addon-docs";
|
||||
|
||||
import {
|
||||
Examples,
|
||||
Example,
|
||||
Note,
|
||||
Title,
|
||||
CustomArgsTable,
|
||||
VariantsTable,
|
||||
VariantRow,
|
||||
} from "@calcom/storybook/components";
|
||||
|
||||
import { Button } from "../button/Button";
|
||||
import { Trash, Navigation, Clipboard } from "../icon";
|
||||
import { ButtonGroup } from "./ButtonGroup";
|
||||
|
||||
<Meta title="UI/Button Group" component={ButtonGroup} />
|
||||
|
||||
<Title title="Button Group" suffix="Brief" subtitle="Version 2.0 — Last Update: 22 Aug 2022"/>
|
||||
<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 ={
|
||||
<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
|
||||
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" >
|
||||
}>
|
||||
<Example title="Default">
|
||||
<ButtonGroup>
|
||||
<Button StartIcon={Trash} variant="icon" color="secondary" />
|
||||
<Button StartIcon={Navigation} variant="icon" color="secondary" />
|
||||
@@ -44,16 +53,14 @@ Button group enables multiple buttons to be combined into a single unit. It offe
|
||||
</Example>
|
||||
</Examples>
|
||||
|
||||
|
||||
<Canvas>
|
||||
<Story
|
||||
name="All Variants">
|
||||
<VariantsTable titles={["Default",'Secondary',"Minimal"]} columnMinWidth={150}>
|
||||
<Story name="All Variants">
|
||||
<VariantsTable titles={["Default", "Secondary", "Minimal"]} columnMinWidth={150}>
|
||||
<VariantRow variant="Default">
|
||||
<ButtonGroup>
|
||||
<Button StartIcon={Trash} variant="icon" />
|
||||
<Button StartIcon={Navigation} variant="icon"/>
|
||||
<Button StartIcon={Clipboard} variant="icon" />
|
||||
<Button StartIcon={Trash} variant="icon" />
|
||||
<Button StartIcon={Navigation} variant="icon" />
|
||||
<Button StartIcon={Clipboard} variant="icon" />
|
||||
</ButtonGroup>
|
||||
<ButtonGroup>
|
||||
<Button StartIcon={Trash} variant="icon" color="secondary" />
|
||||
@@ -68,14 +75,14 @@ Button group enables multiple buttons to be combined into a single unit. It offe
|
||||
</VariantRow>
|
||||
<VariantRow variant="Combined">
|
||||
<ButtonGroup combined>
|
||||
<Button StartIcon={Trash} variant="icon" />
|
||||
<Button StartIcon={Navigation} variant="icon" />
|
||||
<Button StartIcon={Clipboard} variant="icon" />
|
||||
<Button StartIcon={Trash} variant="icon" />
|
||||
<Button StartIcon={Navigation} variant="icon" />
|
||||
<Button StartIcon={Clipboard} variant="icon" />
|
||||
</ButtonGroup>
|
||||
<ButtonGroup combined>
|
||||
<Button StartIcon={Trash} variant="icon" color="secondary" />
|
||||
<Button StartIcon={Navigation} variant="icon" color="secondary" />
|
||||
<Button StartIcon={Clipboard} variant="icon" color="secondary" />
|
||||
<ButtonGroup combined>
|
||||
<Button StartIcon={Trash} variant="icon" color="secondary" />
|
||||
<Button StartIcon={Navigation} variant="icon" color="secondary" />
|
||||
<Button StartIcon={Clipboard} variant="icon" color="secondary" />
|
||||
</ButtonGroup>
|
||||
</VariantRow>
|
||||
</VariantsTable>
|
||||
@@ -86,30 +93,29 @@ Button group enables multiple buttons to be combined into a single unit. It offe
|
||||
<Story
|
||||
name="ButtonGroup Playground"
|
||||
args={{
|
||||
color: 'secondary',
|
||||
color: "secondary",
|
||||
combined: false,
|
||||
}}
|
||||
argTypes={{
|
||||
color: {
|
||||
control: {
|
||||
type: 'select',
|
||||
options: ['primary', 'secondary', 'minimal'],
|
||||
type: "select",
|
||||
options: ["primary", "secondary", "minimal"],
|
||||
},
|
||||
},
|
||||
combined: {
|
||||
control: {
|
||||
type: 'boolean',
|
||||
type: "boolean",
|
||||
},
|
||||
},
|
||||
}}
|
||||
>
|
||||
}}>
|
||||
{({ color, combined }) => (
|
||||
<VariantsTable titles={[`${color}`]} columnMinWidth={150}>
|
||||
<VariantRow variant="">
|
||||
<VariantRow variant="">
|
||||
<ButtonGroup combined={combined}>
|
||||
<Button StartIcon={Trash} variant="icon" color={color} />
|
||||
<Button StartIcon={Navigation} variant="icon" color={color}/>
|
||||
<Button StartIcon={Clipboard} variant="icon" color={color}/>
|
||||
<Button StartIcon={Trash} variant="icon" color={color} />
|
||||
<Button StartIcon={Navigation} variant="icon" color={color} />
|
||||
<Button StartIcon={Clipboard} variant="icon" color={color} />
|
||||
</ButtonGroup>
|
||||
</VariantRow>
|
||||
</VariantsTable>
|
||||
|
||||
Reference in new issue
Block a user