Noncommital Premarital Mischief
    Have ideas to improve npm?Join in the discussion! »

    @leafygreen-ui/badge
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.6 • Public • Published

    Badge

    npm (scoped)

    Example

      <Badge
        variant='lightBlue'
        className='my-badge'
      >
        New
      </Badge>

    Output HTML

      <span class="leafygreen-ui-rhgfxf my-badge">New</span>

    Properties

    variant

    Type: string

    Default: 'default'

    Sets the style variant of the badge. Valid variants for badges are 'default', 'danger', 'warning', 'darkBlue', 'lightBlue', 'primary', 'outline', and 'dark'.

    className

    Type: string

    Default: ''

    Adds a className to the class attribute.

    children

    Type: node

    Default: null

    The content that will appear inside of the <Badge /> component.

    Any other properties will be spread on the root element.

    Note: Specifying the onClick attribute will change the cursor style to pointer.

    Keywords

    none

    Install

    npm i @leafygreen-ui/[email protected]

    Version

    1.0.6

    License

    Apache-2.0

    Unpacked Size

    41.9 kB

    Total Files

    10

    Last publish

    Collaborators

    • avatar
    • avatar