Sha256: f4ca2b9befd3ab7f42802c24ea0f9660af1684f5fb45593e36019a3cc31518b4

Contents?: true

Size: 750 Bytes

Versions: 5

Compression:

Stored size: 750 Bytes

Contents

/* @flow */

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

type FooProps = {
  aria?: object,
  className?: String,
  data?: object,
  id?: String,
}

const Foo = (props: FooProps) => {
  const {
    aria = {},
    className = 'test_foo',
    data = {},
    id,
  } = props

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

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

export default Foo

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
playbook_ui-5.2.0.pre.alpha15 app/pb_kits/playbook/pb_foo/_foo.jsx
playbook_ui-5.2.0.pre.alpha14 app/pb_kits/playbook/pb_foo/_foo.jsx
playbook_ui-5.2.0.pre.alpha13 app/pb_kits/playbook/pb_foo/_foo.jsx
playbook_ui-5.2.0.pre.alpha12 app/pb_kits/playbook/pb_foo/_foo.jsx
playbook_ui-5.2.0.pre.alpha11 app/pb_kits/playbook/pb_foo/_foo.jsx