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