@jaebradley/react-pluralize

    1.1.1 • Public • Published

    React Pluralize codecov npm npm

    react-pluralize

    A simple React component that wraps the pluralize library.

    Storybook

    Installation

    npm install @jaebradley/react-pluralize
    yarn add @jaebradley/react-pluralize

    Usage

    import Pluralize from 'react-pluralize';
     
    <Pluralize
      word={'test'}
      count={1}
    >
      {' sucks'}
    </Pluralize>
     
    <Pluralize
      word={'test'}
      count={5}
    >
      <div>
        <b>
          really sucks
        </b>
      </div>
    </Pluralize>

    pluralize

    API

    Props

    • word (required) - singular form of word
    • count (required) - instances of word
    • includeCounts - option to include count in text; defaults to true

    Install

    npm i @jaebradley/react-pluralize

    DownloadsWeekly Downloads

    7

    Version

    1.1.1

    License

    MIT

    Unpacked Size

    9.59 kB

    Total Files

    6

    Last publish

    Collaborators

    • jaebradley