Sha256: 4d59259ac8b36223274131376484b402668bf4cd067ee1417ee24cbb590ad9d4

Contents?: true

Size: 1.09 KB

Versions: 197

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.js'

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

197 entries across 197 versions & 1 rubygems

Version Path
playbook_ui-10.2.1.alpha.sisensefix app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.jsx
playbook_ui-10.2.1 app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.jsx
playbook_ui-10.2.0 app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.jsx
playbook_ui-10.1.0 app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.jsx
playbook_ui-10.0.3.pre.alpha.walkthrough2 app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.jsx
playbook_ui-10.0.3.pre.alpha.walkthrough app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.jsx
playbook_ui-10.0.1.alpha.railscusticon app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.jsx
playbook_ui-10.0.2.pre.alpha.pre.iconfix app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.jsx
playbook_ui-10.0.1.alpha.rtflexfix app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.jsx
playbook_ui-10.0.0.pre.alphafonts app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.jsx
playbook_ui-10.0.1 app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.jsx
playbook_ui-10.0.0 app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.jsx
playbook_ui-9.19.0.pre.alpha.pre.fonts2 app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.jsx
playbook_ui-9.19.0 app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.jsx
playbook_ui-9.19.0.pre.alphafonts app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.jsx
playbook_ui-9.18.0.flow.bin.alpha app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.jsx
playbook_ui-9.18.0 app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.jsx
playbook_ui-9.17.0 app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.jsx
playbook_ui-9.17.0.pre.decouple.website2 app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.jsx
playbook_ui-9.16.0 app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.jsx