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-10.25.0 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-10.25.0.pre.alpha3 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-10.25.0.pre.treeshaking1 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-10.24.0 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-10.24.0.pre.alpha1 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-10.23.0 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-10.23.0.pre.alpha2 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-10.23.0.pre.alpha1 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-10.22.1 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-10.22.0 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-10.21.1.pre.alpha1 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-10.21.0 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx