# Text

An Orbit component for displaying text.

To import the `Text` component to your project:

```jsx
import { Text } from '@kiwicom/orbit-react-native';
```

## Usage

```jsx
<Text>Text me!</Text>
```

## Props

Table below contains all types of the props available in the Text component.

| Name       | Type            | Default     | Description                                                                                                                                    |
| :--------- | :-------------- | :---------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| align      | [`enum`](#enum) | `"left"`    | The align of the Text.                                                                                                                         |
| children   | `React.Node`    |             | The content of the Text.                                                                                                                       |
| testID     | `string`        |             | Optional prop for testing purposes. (This disables the 'layout-only view removal' optimization for this view!)                                 |
| italic     | `boolean`       | `false`     | If `true`, the Text will be in italic style.                                                                                                   |
| **size**   | [`enum`](#enum) | `"normal"`  | The size of the Text.                                                                                                                          |
| spaceAfter | `enum`          |             | Additional `marginBottom` after component. [See this docs](https://github.com/kiwicom/orbit-components/tree/master/src/common/getSpacingToken) |
| **type**   | [`enum`](#enum) | `"primary"` | The color type of the Text.                                                                                                                    |
| uppercase  | `boolean`       | `false`     | If `true`, the Text will be in uppercase style.                                                                                                |
| **weight** | [`enum`](#enum) | `"regular"` | The weight of the Text.                                                                                                                        |
| nativeID   | `string`        |             | Used to locate this view from native classes. (This disables the 'layout-only view removal' optimization for this view!)                       |

### enum

| type          | align      | size       | weight     |
| :------------ | :--------- | :--------- | :--------- |
| `"attention"` | `"left"`   | `"small"`  | `"normal"` |
| `"primary"`   | `"center"` | `"normal"` | `"bold"`   |
| `"secondary"` | `"right"`  | `"large"`  |            |
| `"info"`      |            |            |            |
| `"success"`   |            |            |            |
| `"warning"`   |            |            |            |
| `"critical"`  |            |            |            |
| `"white"`     |            |            |            |
