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.7.0.pre.alpha.play845allkitsbytypes1232 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.7.0.pre.alpha.play845allkitsbytypes1231 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.7.0.pre.alpha.play978makehighchartsadevdependencypoc1223 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.6.0.pre.alpha.play845allkitsbytypes1219 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.7.0 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.6.0.pre.alpha.tiptapreacthookformbug1210 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.6.0 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.5.0.pre.alpha.play984collapsiblekithidestooltips1203 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.5.0.pre.alpha.PLAY823globalpropoverflow1191 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.5.0.pre.alpha.PLAY823globalpropoverflow1188 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.5.0 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.4.0.pre.alpha.PLAY973Hash1181 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.4.0.pre.alpha.play961turnoffdeprecationwarnings1171 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.4.0 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.3.0 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.2.0.pre.alpha.PLAY986dateTimeRounding1150 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.2.0 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.1.0 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.0.0.pre.alpha.PLAY966collapsiblenav41129 app/pb_kits/playbook/pb_form_group/_form_group.tsx
playbook_ui-13.0.0.pre.alpha.PLAY966collapsiblenav41128 app/pb_kits/playbook/pb_form_group/_form_group.tsx