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