Sha256: 75e186ae6d51f32deca66f6fee36c2801f07dec3bbfc81682c1afe164b2c4512
Contents?: true
Size: 891 Bytes
Versions: 165
Compression:
Stored size: 891 Bytes
Contents
/* @flow */ import React from 'react' import Caption from '../../pb_caption/_caption' import TitleCount from '../../pb_title_count/_title_count' const resultsText = (results: number): string => results == 1 ? 'Result' : 'Results' type ResultsCountProps = { dark?: boolean, results?: ?number, title?: boolean, } const ResultsCount = ({ dark, results, title }: ResultsCountProps) => ( <Choose> <When condition={results && title}> <TitleCount align="center" count={results} dark={dark} title={`${resultsText(results)}:`} /> </When> <When condition={results}> <Caption className="filter-results" dark={dark} size="xs" text={`${results} ${resultsText(results)}`} /> </When> <Otherwise> <div /> </Otherwise> </Choose> ) export default ResultsCount
Version data entries
165 entries across 165 versions & 1 rubygems