Sha256: d6a1a8f2611f1eb9bada694656ff25f21271b23594598c23d1e8e8d409ebff0d

Contents?: true

Size: 883 Bytes

Versions: 352

Compression:

Stored size: 883 Bytes

Contents

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

type FormGroupProps = {
  aria?: {[key: string]: string},
  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

352 entries across 352 versions & 1 rubygems

Version Path
playbook_ui-13.12.0.pre.alpha.PLAY880cardkithighlightzindex1655 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.12.0.pre.alpha.PLAY1081exportingtypes1627 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.12.0.pre.alpha.PLAY1081exportingtypes1626 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.12.0.pre.alpha.play900startratingasinput1612 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.12.0.pre.alpha.PLAY1081exporttypes1609 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.12.0.pre.alpha.PLAY1081exporttypes1608 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.12.0.pre.alpha.play1051testhighcharts1581 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.12.0.pre.alpha.play1051testhighcharts1580 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.12.0.pre.alpha.play1051testhighcharts1579 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.12.0.pre.alpha.PLAY1093typeaheadkitdocbug1577 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.12.0.pre.alpha.play1051testhighcharts1574 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.12.0.pre.alpha.play1051highchartstest1567 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.12.0.pre.alpha.play1051highchartstest1558 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.12.0.pre.alpha.play1051highchartstest1556 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.12.0.pre.alpha.PLAY1051removinghighchartsdependency1551 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.12.0.pre.alpha.play900startratingasinput1550 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.12.0.pre.alpha.play900startratingasinput1543 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.11.1.pre.alpha.play900startratingasinput1530 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.12.0 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.11.1 app/pb_kits/playbook/pb_form_group/_form_group.tsx