@kiwicom/orbit-components
Version:
<div align="center"> <a href="https://orbit.kiwi" target="_blank"> <img alt="orbit-components" src="https://orbit.kiwi/wp-content/uploads/2018/08/orbit-components.png" srcset="https://orbit.kiwi/wp-content/uploads/2018/08/orbit-components@2x.png 2x"
31 lines (27 loc) • 1.15 kB
Markdown
# Badge
To implement Badge component into your project you'll need to add the import:
```jsx
import Badge from "@kiwicom/orbit-components/lib/Badge";
```
After adding import into your project you can use it simply like:
```jsx
<Badge>Hello!</Badge>
```
## Props
Table below contains all types of the props available in Badge component.
| Name | Type | Default | Description |
| :------------ | :---------------------| :-------------- | :------------------------------- |
| circled | `boolean` | `false` | If `true`, the Badge will have circular shape.
| **children** | `React.Node` | | The content of the Badge.
| dataTest | `string` | | Optional prop for testing purposes.
| icon | `React.Node` | | The displayed icon on the left.
| type | [`enum`](#enum) | `"neutral"` | The color type of the Badge.
### enum
| type |
| :------------ |
| `"neutral"` |
| `"dark"` |
| `"info"` |
| `"success"` |
| `"warning"` |
| `"critical"` |