Files
ohif-viewer/platform/ui/src/components/ButtonGroup/ButtonGroup.mdx
T

114 lines
2.6 KiB
Plaintext
Raw Normal View History

2020-03-06 16:47:40 -03:00
---
name: ButtonGroup
menu: Components
route: components/buttonGroup
---
import { Playground, Props } from 'docz';
import Button from '../Button';
2020-03-10 16:11:12 -03:00
import IconButton from './../IconButton';
import Icon from './../Icon';
2020-03-06 16:47:40 -03:00
import ButtonGroup from './';
# ButtonGroup
Group Button display buttons together sharing its configurations
## Import
```javascript
2020-03-23 17:50:58 -03:00
import { ButtonGroup } from '@ohif/ui';
2020-03-06 16:47:40 -03:00
```
## Basic button group
<Playground>
2020-03-12 13:23:05 -03:00
<div className="p-4 flex flex-col items-center">
2020-03-06 16:47:40 -03:00
<ButtonGroup color="primary" className="m-2">
<Button>One</Button>
<Button>Two</Button>
<Button>Tree</Button>
</ButtonGroup>
<ButtonGroup color="primary" variant="contained" className="m-2">
<Button>One</Button>
<Button>Two</Button>
<Button>Tree</Button>
</ButtonGroup>
<ButtonGroup color="primary" variant="text" className="m-2">
<Button>One</Button>
<Button>Two</Button>
<Button>Tree</Button>
</ButtonGroup>
</div>
</Playground>
## Group sizes and colorss
<Playground>
2020-03-12 13:23:05 -03:00
<div className="p-4 flex flex-col items-center">
2020-03-06 16:47:40 -03:00
<ButtonGroup color="default" size="small" className="m-2">
<Button>One</Button>
<Button>Two</Button>
<Button>Tree</Button>
</ButtonGroup>
<ButtonGroup color="primary" size="medium" className="m-2">
<Button>One</Button>
<Button>Two</Button>
<Button>Tree</Button>
</ButtonGroup>
<ButtonGroup color="secondary" size="large" className="m-2">
<Button>One</Button>
<Button>Two</Button>
<Button>Tree</Button>
</ButtonGroup>
</div>
</Playground>
## Group orientation
<Playground>
2020-03-12 13:23:05 -03:00
<div className="p-4 flex flex-row justify-center">
2020-03-06 16:47:40 -03:00
<ButtonGroup orientation="vertical" color="primary" className="m-2">
<Button>One</Button>
<Button>Two</Button>
<Button>Tree</Button>
</ButtonGroup>
<ButtonGroup
orientation="vertical"
color="primary"
variant="contained"
className="m-2"
>
<Button>One</Button>
<Button>Two</Button>
<Button>Tree</Button>
</ButtonGroup>
<ButtonGroup
orientation="vertical"
color="primary"
variant="text"
className="m-2"
>
<Button>One</Button>
<Button>Two</Button>
<Button>Tree</Button>
</ButtonGroup>
</div>
</Playground>
## Split Button
<Playground>
2020-03-12 13:23:05 -03:00
<div className="p-4 flex flex-col items-center">
2020-03-06 16:47:40 -03:00
<ButtonGroup color="primary" className="m-2">
2020-03-10 16:11:12 -03:00
<Button>Options</Button>
2020-03-06 16:47:40 -03:00
<IconButton className="mr-2">
2020-03-10 16:11:12 -03:00
<Icon name="settings" />
2020-03-06 16:47:40 -03:00
</IconButton>
</ButtonGroup>
</div>
</Playground>
## Properties
<Props of={ButtonGroup} />