4.0.3 • Published 5 years ago
@dd-test/bdge v4.0.3
Badge
View on MongoDB.design
Installation
Yarn
yarn add @leafygreen-ui/badgeNPM
npm install @leafygreen-ui/badgeExample
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.
4.0.3
5 years ago