@intility/bifrost-react
Version:
React library for Intility's design system, Bifrost.
40 lines (39 loc) • 1.05 kB
JavaScript
import Button from "./Button.js";
import ButtonExpand from "./Button.Expand.js";
import ButtonGroup from "./Button.Group.js";
/**
* Clickable button
*
* @see https://bifrost.intility.com/react/button
*
* @example
* <Button>Basic</Button>
* <Button variant='filled'>Filled</Button>
* <Button variant='flat'>Flat</Button>
* <Button onClick={() => alert("Hello, world!")}>Click me</Button>
*/
export default Object.assign(Button, {
/**
* Wrapper for multiple buttons
*
* @see https://bifrost.intility.com/react/button#buttongroup
*
* @example
* <Button.Group>
* <Button active>Rock</Button>
* <Button>Paper</Button>
* <Button>Scissors</Button>
* </Button.Group>
*/
Group: ButtonGroup,
/** Button with rotating caret icon, useful for toggling expandable content
*
* @see https://bifrost.intility.com/react/button#buttonexpand
*
* @example
* <Button.Expand open={openState} onClick={() => setOpenState(!openState)}>
* Toggle
* </Button.Expand>
*/
Expand: ButtonExpand
});