Sha256: 90e21f0c0da4f1af54f35759b3b9e99a7809b13f5386bd867d65cd5874a82d59

Contents?: true

Size: 651 Bytes

Versions: 359

Compression:

Stored size: 651 Bytes

Contents

import React from 'react'
import FilterSingle, { FilterSingleProps } from './FilterSingle'
import FilterDouble, { FilterDoubleProps } from './FilterDouble'

type FilterProps =
  | FilterSingleProps
  | (FilterDoubleProps & {
      double?: boolean,
    })

const Filter = ({ 
  double = false,
  ...templateProps
  }: FilterProps): React.ReactElement => {
  const displayFilter = () => {
    if (double === true) {
      return (
        <FilterDouble {...templateProps} />
      )
    } else {
      return (
        <FilterSingle {...templateProps} />
      )
    }
  }
  return (
    <>
      {displayFilter()}
    </>
  )
}

export default Filter

Version data entries

359 entries across 359 versions & 1 rubygems

Version Path
playbook_ui-13.14.0 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.13.0.pre.alpha.PLAY1097linterenhancedelement1728 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.13.0.pre.alpha.play10821727 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.13.0.pre.alpha.play10821726 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.13.0.pre.alpha.play10221678 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.13.0.pre.alpha.PLAY1090csstokens1675 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.13.0.pre.alpha.play900startratingasinput1657 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.13.0 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.12.0.pre.alpha.PLAY880cardkithighlightzindex1655 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.12.0.pre.alpha.PLAY1081exportingtypes1627 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.12.0.pre.alpha.PLAY1081exportingtypes1626 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.12.0.pre.alpha.PLAY1081exporttypes1624 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.12.0.pre.alpha.PLAY1081exporttypes1623 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.12.0.pre.alpha.play900startratingasinput1612 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.12.0.pre.alpha.PLAY1081exporttypes1611 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.12.0.pre.alpha.PLAY1081exporttypes1609 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.12.0.pre.alpha.PLAY1081exporttypes1608 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.12.0.pre.alpha.play10281596 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.12.0.pre.alpha.play1051testhighcharts1581 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.12.0.pre.alpha.play1051testhighcharts1580 app/pb_kits/playbook/pb_filter/Filter/index.tsx