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.18.0.pre.alpha.thor93bargraphoptions2219 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.18.0.pre.alpha.thor93bargraphoptions2211 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.18.0.pre.alpha.play1141iconkitusinglibrary2210 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.18.0.pre.alpha.powercentrainplaybookpt22201 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.18.0.pre.alpha.PLAY8672199 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.18.0.pre.alpha.PBNTR191AdvancedTableFinalFixes2197 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.18.0.pre.alpha.dependabotnpmandyarnreactrouterdom62212196 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.18.0.pre.alpha.dependabotnpmandyarntypescripteslintparser56202194 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.18.0.pre.alpha.PLAY12062192 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.18.0.pre.alpha.useexactnodejsversionghactions2183 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.18.0.pre.alpha.useexactnodejsversionghactions2181 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.18.0.pre.alpha.useexactnodejsversionghactions2180 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.18.0.pre.alpha.useexactnodejsversionghactions2179 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.18.0.pre.alpha.PBNTR191AdvancedTableFinalFixes2178 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.18.0.pre.alpha.PLAY12062177 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.18.0.pre.alpha.PBNTR191AdvancedTableFinalFixes2176 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.18.0.pre.alpha.dependabotnpmandyarnpowerhomeplaybookicons001alpha52175 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.18.0.pre.alpha.dependabotnpmandyarnpowerhomeplaybookicons001alpha52174 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.18.0.pre.alpha.PBNTR191AdvancedTableFinalFixes2173 app/pb_kits/playbook/pb_filter/Filter/index.tsx
playbook_ui-13.18.0.pre.alpha.PBNTR191AdvancedTableFinalFixes2159 app/pb_kits/playbook/pb_filter/Filter/index.tsx