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.9.0.pre.alpha.play845addswiftkitspage1272 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.9.0.pre.alpha.play845allkitsbytypes1271 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.9.0.pre.alpha.play845allkitsbytypes1270 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.9.0.pre.alpha.play845allkitsbytypes1268 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.9.0.pre.alpha.play845allkitsbytypes1266 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.9.0.pre.alpha.play845allkitsbytypes1264 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.9.0.pre.alpha.play845allkitsbytypes1263 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.9.0.pre.alpha.play845allkitsbytypes1262 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.9.0.pre.alpha.PLAY962SingleSelect1261 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.9.0.pre.alpha.play845allkitsbytypes1260 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.9.0 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.8.0.pre.alpha.play845allkitsbytypes1258 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.8.0.pre.alpha.play845allkitsbytypes1257 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.8.0.pre.alpha.PLAY962SingleSelect1256 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.8.0.pre.alpha.play845allkitsbytypes1255 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.8.0.pre.alpha.play845allkitsbytypes1254 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.8.0.pre.alpha.PLAY962SingleSelect1246 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.8.0.pre.alpha.PLAY1016reactionbuttonemojibug1245 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.8.0 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.7.0.pre.alpha.play845allkitsbytypes1234 app/pb_kits/playbook/pb_form_group/_form_group.tsx