ice-frontend-react-mobx
Version:
ICE Frontend REACT+MobX
60 lines (48 loc) • 1.63 kB
Markdown
<!-- File generated on 2016-10-31 by Jay -->
## Badge
*Created on 2016-10-31*
#### Instructions:
This component generates a small badge to the top-right of its child(ren).
##### Example:
```html
<Badge
badgeData={5}
primary={true}
badgeIcon='icon_name'
badgeClass='exampleClass'
badgeContent={<Button primary label="button label" />}
/ >
```
##### Props:
| Name | Type | Default | Description |
|------|-------|---------|--------------|
| badgeIcon | string | notification icon | This assigns the child icon of the badge.
| badgeContent | node | none | This is the override content that the badge is applied to. |
| badgeData | object | none | Number shown in the actual badge area |
| badgeClass | string | none | The css class name of the root element. |
| primary | bool | false | If true, badge will use the primary colors.
| accent | bool | false | If true, badge will use the accent colors.
###### Images:
----
Standard Implementation: *This will render component without any theming applied to it*

```html
<Badge badgeData={5} />
```
----
"Primary" Implementation: *This is subject to colors selected in theme*

```html
<Badge badgeData={5} primary={true} />
```
----
Non-standard Implementation: *Utilizes an item other than the standard icon*

```html
<Badge
badgeData={5}
primary={true}
badgeContent={<Button primary label="button label"}
/ >
```
----