@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"
36 lines (31 loc) • 1.63 kB
Markdown
# Icon
To implement Icon component into your project you need to know its name. You can find it in [the list of all icons](https://kiwicom.github.io/orbit-components/?selectedKind=Icon&selectedStory=List%20of%20all%20icons). Then just add an import of the icon:
```jsx
import Airplane from "@kiwicom/orbit-components/lib/icons/Airplane";
```
After adding import into your project you can use it simply like:
```jsx
<Airplane />
```
## Props
Table below contains all types of the props available for icons in general.
| Name | Type | Default | Description |
| :------------ | :-------------- | :-------------- | :------------------------------- |
| className | `string` | | The optional className of Icon.
| color | [`enum`](#enum) | `currentColor` | The color of the Icon.
| customColor | `string` | | The customColor of the Icon. [See Functional specs](#functional-specs)
| dataTest | `string` | | Optional prop for testing purposes.
| **size** | [`enum`](#enum) | `"medium"` | The size of the Icon.
### enum
| color | size |
| :------------ | :--------- |
| `"attention"` | `"small"` |
| `"primary"` | `"medium"` |
| `"secondary"` | `"large"` |
| `"tertiary"` | |
| `"info"` | |
| `"success"` | |
| `"warning"` | |
| `"critical"` | |
## Functional specs
* If you don't pass `customColor` or `color` prop to Icon, it will inherit color from parent container with `currentColor` by default.