@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"
25 lines (21 loc) • 1.26 kB
Markdown
# Tile
To implement Tile component into your project you'll need to the import at least the Tile:
```jsx
import Tile from "@kiwicom/orbit-components/lib/Tile";
```
After adding import into your project you can use it simply like:
```jsx
<Tile title="Title" />
```
## Props
Table below contains all types of the props available in Tile component.
| Name | Type | Default | Description |
| :------------ | :---------------------| :-------------- | :------------------------------- |
| children | `React.Node` | | The content of the Tile.
| external | `boolean` | `false` | If `true`, the Tile opens link in a new tab.
| href | `string` | | The URL of the link to open when Tile is clicked. [See Functional specs](#functional-specs)
| icon | `React.Node` | | Displayed icon on the left side of the Tile.
| onClick | `func` | | Function for handling onClick event.
| title | `string` | | The title of the Tile.
## Functional specs
* By passing the `href` prop into Tile, it will render into `a` element.