Sha256: b32ffd8f71db39eaec64ec7facac4e957d208576b2e1468d086a6130b5255587

Contents?: true

Size: 820 Bytes

Versions: 112

Compression:

Stored size: 820 Bytes

Contents

/* @flow */

import React, { Node } from 'react'
import classnames from 'classnames'

import { globalProps } from '../../utilities/globalProps'

import Card from '../../pb_card/_card'

type FilterBackgroundProps = {
  background: boolean,
  className: string,
  children: Node,
  dark: boolean,
}

const FilterBackground = (props: FilterBackgroundProps) => {
  const { background = true, className, children, dark } = props

  return (
    <div className={classnames(`pb_filter_kit ${className}`, globalProps(props))}>
      <Choose>
        <When condition={background}>
          <Card
              dark={dark}
              padding="none"
          >
            {children}
          </Card>
        </When>
        <Otherwise>{children}</Otherwise>
      </Choose>
    </div>
  )
}

export default FilterBackground

Version data entries

112 entries across 112 versions & 1 rubygems

Version Path
playbook_ui-12.5.0.pre.alpha.datepickerinput1 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-12.5.0.pre.alpha.phonerails1 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-12.5.0.pre.alpha.datepicker1 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-12.5.0 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-12.4.0.pre.alpha.map1 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-12.4.0.pre.alpha.devdocstest1 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-12.4.0 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-12.3.1.pre.alpha.phone1 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-12.3.1 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-12.3.0.pre.alpha.patchtest1 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-12.3.0 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-12.2.0 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-12.1.0 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-12.0.0 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-11.20.0.pre.alpha.passthrough1 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-11.20.0.pre.alpha.railsdialog1 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-11.20.0.pre.alpha.focus1 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-11.20.0 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-11.19.0.pre.alpha.map1 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-11.19.0.pre.alpha.pagpassthrough1 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx