Sha256: e0302f2fb2e0232c0e85f7304ece77e98e45d235ad5aca31a2a7b341cd769e5b

Contents?: true

Size: 816 Bytes

Versions: 80

Compression:

Stored size: 816 Bytes

Contents

/* @flow */

import React from 'react'
import classnames from 'classnames'
import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
import { globalProps } from '../utilities/globalProps.js'

type FormGroupProps = {
  aria?: object,
  children?: Node,
  className?: string,
  data?: object,
  id?: string,
}

const FormGroup = (props: FormGroupProps) => {
  const {
    aria = {},
    className,
    data = {},
    id,
    children,
  } = props

  const ariaProps = buildAriaProps(aria)
  const dataProps = buildDataProps(data)
  const classes = classnames(buildCss('pb_form_group_kit'), globalProps(props), className)

  return (
    <div
        {...ariaProps}
        {...dataProps}
        className={classes}
        id={id}
    >
      {children}
    </div>
  )
}

export default FormGroup

Version data entries

80 entries across 80 versions & 1 rubygems

Version Path
playbook_ui-9.7.0.pre.alpha.a11y.btn app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-9.7.0 app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-9.6.1 app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-9.6.1.pre.deps1 app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-9.6.0 app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-9.5.0.alpha.rs.downgrade app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-9.5.0 app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-9.4.0.alpha.sisense app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-9.4.0.alpha.user.kit.bug app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-9.4.0 app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-9.3.1.pre.alpha2 app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-9.4.0.pre.alpha2 app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-9.4.0.pre.alpha1 app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-9.3.1.pre.alpha1 app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-9.3.0.alpha.inline3 app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-9.3.0.pre.alpha.password.strength.2 app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-9.3.0.alpha.inline2 app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-9.3.0.alpha.inline1 app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-9.3.0.pre.alpha.password.strength.1 app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-9.3.0 app/pb_kits/playbook/pb_form_group/_form_group.jsx