Sha256: e75d14a6f9863670c9eb5b57278d94a3fbc14ed600d138cf4ee456dcb6b0e534

Contents?: true

Size: 1.91 KB

Versions: 60

Compression:

Stored size: 1.91 KB

Contents

/* @flow */

import React from 'react'

import CurrentFilters, { FilterDescription } from './CurrentFilters'
import FilterBackground, { FilterBackgroundProps } from './FilterBackground'
import FiltersPopover from './FiltersPopover'
import ResultsCount from './ResultsCount'
import SortMenu, {
  SortingChangeCallback,
  SortOptions,
  SortValue,
} from './SortMenu'

import Caption from '../../pb_caption/_caption'
import Flex from '../../pb_flex/_flex'
import SectionSeparator from '../../pb_section_separator/_section_separator'
export type FilterDoubleProps = {
  children: Node,
  filters?: FilterDescription,
  onSortChange: SortingChangeCallback,
  results?: number,
  sortOptions: SortOptions,
  sortValue?: SortValue,
} & FilterBackgroundProps

const FilterDouble = ({
  onSortChange,
  sortOptions,
  sortValue,
  filters,
  results,
  children,
  dark,
  minWidth,
  placement,
  ...bgProps
}: FilterDoubleProps) => (
  <FilterBackground
      dark={dark}
      {...bgProps}
  >
    <Flex
        orientation="row"
        vertical="center"
    >
      <FiltersPopover
          dark={dark}
          minWidth={minWidth}
          placement={placement}
      >
        {children}
      </FiltersPopover>
      <CurrentFilters
          dark={dark}
          filters={filters}
      />
    </Flex>
    <SectionSeparator dark={dark} />
    <Flex
        className="filter-bottom"
        orientation="row"
        spacing="between"
        vertical="center"
    >
      <ResultsCount
          dark={dark}
          results={results}
          title
      />
      <Flex
          orientation="row"
          vertical="center"
      >
        <Caption
            dark={dark}
            text="sort by:"
        />
        <SortMenu
            dark={dark}
            onChange={onSortChange}
            options={sortOptions}
            value={sortValue}
        />
      </Flex>
    </Flex>
  </FilterBackground>
)

export default FilterDouble

Version data entries

60 entries across 60 versions & 1 rubygems

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