0.0.1 • Published 4 years ago
pluralize-react v0.0.1
Pluralize: React Component
Pluralization component for React.
Install
npm install --save pluralize-reactor
yarn add pluralize-reactUsage
Normal usage
<Pluralize count={5000} singular="Example" /> output: 5,000 ExamplesCustom plural
<Pluralize count={5000} singular="Person" plural="People" /> output: 5,000 PeopleZero Count
<Pluralize count={0} singular="Example" zero="No Examples" /> output: No ExamplesHide Count
<Pluralize count={0} singular="Example" showCount={false} /> output: ExamplesProps
- count: number;
- singular: string;
- plural?: string;
- zero?: string;
- className?: string;
- showCount?: boolean;
Development
- Clone the repo
- yarn install
- yarn storybook for preview
0.0.1
4 years ago