Sha256: 51d1f6bb143b4b9118a8cd4e586eed4591a5789b3d94804bc5ae2cf91b9a3119
Contents?: true
Size: 1.09 KB
Versions: 32
Compression:
Stored size: 1.09 KB
Contents
/* @flow */ import React from 'react' import classnames from 'classnames' import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props' import { globalProps } from '../utilities/globalProps' type ButtonToolbarProps = { aria?: object, children?: array<React.ReactChild>, className?: string, connected?: boolean, data?: object, id?: string, onClick?: EventHandler, orientation?: "horizontal" | "vertical", text?: string, variant?: "primary" | "secondary", } const ButtonToolbar = (props: ButtonToolbarProps) => { const { aria = {}, children, className, data = {}, id, orientation = 'horizontal', text, variant = 'primary', } = props const ariaProps = buildAriaProps(aria) const dataProps = buildDataProps(data) const classes = classnames( buildCss('pb_button_toolbar_kit', orientation, variant), globalProps(props), className ) return ( <div {...ariaProps} {...dataProps} className={classes} id={id} > {children || text} </div> ) } export default ButtonToolbar
Version data entries
32 entries across 32 versions & 1 rubygems