ButtonGroup
Button groups provide a way to group interactions.
Examples
import React from 'react';
import ReactDOM from 'react-dom';
import { ButtonGroup, Button } from 'furl-components';
ReactDOM.render(
<div>
<ButtonGroup
color='primary'
fill='solid'
size='large'
text='uppercase'
>
<Button>A</Button>
<Button>B</Button>
<Button>C</Button>
<Button>D</Button>
</ButtonGroup>
<ButtonGroup
color='success'
fill='grafient'
shape='rounded'
data={['A', 'B', 'C', 'D']}
/>
</div>,
document.getElementById('root')
);API
| Property | Description | Type | Default | ||
|---|---|---|---|---|---|
| color | button group color | string | 'plain' | ||
| size | button group size | string | 'normal' | ||
| fill | button group fill style | string | 'flat' | ||
| shape | button group shape | string | 'normal' | ||
| text | button group text transformation | string | 'normal' | ||
| data | button group data source | array(object) | |||
Notes
- You can populate a button group either via passing children to it or via the use of the
dataprop. Ifdatais provided, it will take precedence over passed children, therefore rendering only the content provided indata. - A
ButtonGrouponly accepts children of theButtoncomponent type. dataonly accepts an array of string orobject values. Objects in thedataarray must contain acontentvalue and any other props you might want to pass.contentcan either be a string or an object, allowing you to pass React component trees.colorcan be any of the predefined color palettes ('plain','primary','secondary','success','warning'or'danger').sizecan be one of the following:'small','normal'or'large'and will override thesizeproperty of any of the component’s children.fillcan be one of the following:'flat','solid','light','gradient','outline','ghost'or'link'and will override thefillproperty of any of the component’s children.shapecan be either'normal'or'rounded'and will override theshapeproperty of any of the component’s children.textcan be either'normal'or'uppercase'and will override thetextproperty of any of the component’s children.
