@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"
30 lines (26 loc) • 1.39 kB
Markdown
# TextLink
To implement TextLink component into your project you'll need to add the import:
```jsx
import TextLink from "@kiwicom/orbit-components/lib/TextLink";
```
After adding import into your project you can use it simply like:
```jsx
<TextLink>Hello World!</TextLink>
```
## Props
Table below contains all types of the props available in TextLink component.
| Name | Type | Default | Description |
| :------------ | :---------------------| :-------------- | :------------------------------- |
| children | `React.Node` | | The content of the TextLink.
| dataTest | `string` | | Optional prop for testing purposes.
| external | `boolean` | `false` | If `true`, the TextLink opens link in a new tab.
| href | `string` | | The URL to link when the TextLink is clicked.
| icon | `React.Node` | | The displayed icon.
| onClick | `func` | | Function for handling onClick event.
| rel | `string` | | The rel of the TextLink.
| **type** | [`enum`](#enum) | `"primary"` | The color type of the TextLink.
### enum
| type |
| :------------ |
| `"primary"` |
| `"secondary"` |