<commit_before># Anchor UI

UI kit for chat engines with React

## Usage

Install from npm

[![NPM](https://nodei.co/npm/anchor-ui.png)](https://nodei.co/npm/anchor-ui/)

### Components

`withTheme` higherOrderComponent for providing theme color context

Usage:
```javascript
export default withTheme(YourComponent, '#1ba6c4');
```

Arguments:

| Name           | Type      | Required | Default | Description               |
|:---------------|:----------|:---------|:--------|:--------------------------|
| ChildComponent | Component | Yes      |         | Child component to render |
| color          | String    | Yes      | {}      | Theme color               |

---

`<Alert />` used for rendering an alert.

Props:

| Name        | Type     | Required | Default | Description                                                                   |
|:------------|:---------|:---------|:--------|:------------------------------------------------------------------------------|
| text        | Node     | Yes      |         | Text to display                                                               |
| type        | String   | Yes      |         | Type of alert, either of the following: 'success', 'error', 'warning', 'info' |
| hideAlert   | Function | Yes      | {}      | Function to hide the alert                                                    |
| style       | Object   | No       | {}      | Override the styles of the root element                                       |
| textStyle   | Object   | No       | {}      | Override the styles of the text element                                       |
| iconStyle   | Object   | No       | {}      | Override the styles of the icon element                                       |
| buttonStyle | Object   | No       | {}      | Override the styles of the button element                                     |

---

---

`<Avatar />` used for rendering a user's profile image.

Props:

| Name  | Type   | Required | Default | Description                             |
|:------|:-------|:---------|:--------|:----------------------------------------|
| image | String | Yes      |         | Path to user's profile image            |
| style | Object | No       | {}      | Override the styles of the root element |
<commit_msg>:twisted_rightwards_arrows: Merged origin/master<commit_after># Anchor UI

UI kit for chat engines with React

## Usage

Install from npm

[![NPM](https://nodei.co/npm/anchor-ui.png)](https://nodei.co/npm/anchor-ui/)

### Components

`withTheme` higherOrderComponent for providing theme color context

Usage:
```javascript
export default withTheme(YourComponent, '#1ba6c4');
```

Arguments:

| Name           | Type      | Required | Default | Description               |
|:---------------|:----------|:---------|:--------|:--------------------------|
| ChildComponent | Component | Yes      |         | Child component to render |
| color          | String    | Yes      |         | Theme color               |

---

`<Alert />` used for rendering an alert.

Props:

| Name        | Type     | Required | Default | Description                                                                   |
|:------------|:---------|:---------|:--------|:------------------------------------------------------------------------------|
| text        | Node     | Yes      |         | Text to display                                                               |
| type        | String   | Yes      |         | Type of alert, either of the following: 'success', 'error', 'warning', 'info' |
| hideAlert   | Function | Yes      | {}      | Function to hide the alert                                                    |
| style       | Object   | No       | {}      | Override the styles of the root element                                       |
| textStyle   | Object   | No       | {}      | Override the styles of the text element                                       |
| iconStyle   | Object   | No       | {}      | Override the styles of the icon element                                       |
| buttonStyle | Object   | No       | {}      | Override the styles of the button element                                     |

---

---

`<Avatar />` used for rendering a user's profile image.

Props:

| Name  | Type   | Required | Default | Description                             |
|:------|:-------|:---------|:--------|:----------------------------------------|
| image | String | Yes      |         | Path to user's profile image            |
| style | Object | No       | {}      | Override the styles of the root element |

{'fraction_non_alphanumeric': 0.2057229568610449, 'fraction_numerical': 0.001300672013873835, 'mean_word_length': 0.9768637532133676, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 21, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '154881', 'n_tokens_mistral': 1045, 'n_tokens_neox': 1018, 'n_words': 320}