Sha256: c75f30fabdbfccb791b588b0775bf61e7a042203bb74aedc4f464ac56c111103

Contents?: true

Size: 880 Bytes

Versions: 47

Compression:

Stored size: 880 Bytes

Contents

/* @flow */

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

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

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

  const ariaProps = buildAriaProps(aria)
  const dataProps = buildDataProps(data)
  const classes = classnames(buildCss('pb_form_group_kit', { full: fullWidth }), globalProps(props), className)

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

export default FormGroup

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
playbook_ui-11.4.0.pre.alpha.rubytheme2 app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-11.4.0.pre.alpha.rubytheme1 app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-11.4.0 app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-11.3.0.pre.alpha2 app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-11.3.0.pre.alpha1 app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-11.3.0 app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-11.2.7 app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-11.2.6 app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-11.2.5 app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-11.2.4 app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-11.2.4.pre.alpha1 app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-11.2.3 app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-11.2.2 app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-11.2.1 app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-11.2.0 app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-11.1.2 app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-11.1.2.pre.alpha1 app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-11.1.1 app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-11.1.1.pre.alpha1 app/pb_kits/playbook/pb_form_group/_form_group.jsx
playbook_ui-11.1.0 app/pb_kits/playbook/pb_form_group/_form_group.jsx