@leafygreen-ui/badge
leafyGreen UI Kit Badge
Last updated 2 months ago by brookescarlett .
Apache-2.0 · Original npm · Tarball · package.json
$ cnpm install @leafygreen-ui/badge 
SYNC missed versions from official npm registry.

Badge

npm (scoped)

View on Storybook

Installation

Yarn

yarn add @leafygreen-ui/badge

NPM

npm install @leafygreen-ui/badge

Example

import Badge from '@leafygreen-ui/badge';

<Badge variant="blue" className="my-badge">
  New
</Badge>;

Output HTML

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

Properties

Prop Type Description Default
variant 'lightgray' | 'darkgray'| 'red'| 'blue'| 'green'| 'yellow' Sets the style variant of the badge. 'lightgray'
className string Adds a className to the class attribute
children node The content that will appear inside of the <Badge /> component.
... native div attributes Any other props will be spread on the root div element

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

Current Tags

  • 4.0.2                                ...           latest (2 months ago)

19 Versions

  • 4.0.2                                ...           2 months ago
  • 4.0.1                                ...           3 months ago
  • 4.0.0                                ...           3 months ago
  • 3.0.2                                ...           5 months ago
  • 3.0.1                                ...           6 months ago
  • 3.0.0                                ...           a year ago
  • 2.0.4                                ...           a year ago
  • 2.0.3                                ...           a year ago
  • 2.0.2                                ...           a year ago
  • 2.0.1                                ...           a year ago
  • 2.0.0                                ...           2 years ago
  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.6                                ...           2 years ago
  • 1.0.5                                ...           2 years ago
  • 1.0.4                                ...           2 years ago
  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 31
Dependencies (2)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2017 © taobao.org |