Sha256: 42b90e311b85ff5dd641888d49c31a5a3d8ca3d4949282482ea2f505d123ea8e

Contents?: true

Size: 812 Bytes

Versions: 104

Compression:

Stored size: 812 Bytes

Contents

/* @flow */

import React, { Node } from 'react'
import { Card } from '../../'
import classnames from 'classnames'
import { globalProps } from '../../utilities/globalProps.js'

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

104 entries across 104 versions & 1 rubygems

Version Path
playbook_ui-7.16.0.pre.alpha5 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-7.16.0.pre.alpha4 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-7.16.0.pre.alpha3 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-7.16.0.pre.alpha2 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-7.16.0.pre.alpha1 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-7.14.0.pre.alpha1 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-7.16.0 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-7.15.1 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-7.15.0 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-7.14.0 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-7.13.0.pre.alpha1 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-7.13.0 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-7.12.1 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-7.12.0 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-7.11.1 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-7.11.0 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-7.11.0.pre.alpha1 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-7.10.0 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-7.9.0 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx
playbook_ui-7.8.4 app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx