Sha256: 3db436f1e9162efb3054c2203cf7739632ccb3a46851f0b829718269e604dba4

Contents?: true

Size: 685 Bytes

Versions: 29

Compression:

Stored size: 685 Bytes

Contents

/* @flow */
import React from 'react'
import classnames from 'classnames'
import { buildCss } from '../utilities/props'

type FlexItemPropTypes = {
  children: Array<React.ReactNode> | React.ReactNode,
  fixedSize: String,
  grow: Boolean,
  className: String,
}

const FlexItem = ({
  children,
  className,
  fixedSize,
  grow,
}: FlexItemPropTypes) => {
  const growClass = grow === true ? 'grow' : ''
  const fixedStyle = fixedSize !== undefined ? { flexBasis: `${fixedSize}` } : null

  return (
    <div
        className={classnames(buildCss('pb_flex_item_kit', growClass), className)}
        style={fixedStyle}
    >
      {children}
    </div>
  )
}

export default FlexItem

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
playbook_ui-4.6.0 app/pb_kits/playbook/pb_flex/_flex_item.jsx
playbook_ui-4.5.2 app/pb_kits/playbook/pb_flex/_flex_item.jsx
playbook_ui-4.5.1 app/pb_kits/playbook/pb_flex/_flex_item.jsx
playbook_ui-4.5.0 app/pb_kits/playbook/pb_flex/_flex_item.jsx
playbook_ui-4.4.1 app/pb_kits/playbook/pb_flex/_flex_item.jsx
playbook_ui-4.4.0 app/pb_kits/playbook/pb_flex/_flex_item.jsx
playbook_ui-4.3.1 app/pb_kits/playbook/pb_flex/_flex_item.jsx
playbook_ui-4.3.0 app/pb_kits/playbook/pb_flex/_flex_item.jsx
playbook_ui-4.2.0 app/pb_kits/playbook/pb_flex/_flex_item.jsx