Skip to content

Commit

Permalink
Changes from missive#208
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsenpeder committed Dec 17, 2018
1 parent 362968b commit f88a01c
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 32 deletions.
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ import { Picker } from 'emoji-mart-native'
| **defaultSkin** | | `1` | Default skin color: `1, 2, 3, 4, 5, 6` |
| **style** | | | Inline styles applied to the root element. Useful for positioning |
| **notFoundEmoji** | | `sleuth_or_spy` | The emoji shown when there are no search results |
| **notFound** | | | [Not Found](#not-found) |
| **notFound** | | | [Not found](#not-found) |
| **categoryEmojis** | | `{}` | [Custom category emojis](#custom-category-emojis) |

#### I18n
```js
Expand Down Expand Up @@ -266,7 +267,7 @@ const customEmojis = [
<Picker custom={customEmojis} />
```

## Not Found
## Not found
You can provide a custom Not Found object which will allow the appearance of the not found search results to change. In this case, we change the default 'sleuth_or_spy' emoji to Octocat when our search finds no results.

```js
Expand All @@ -277,6 +278,28 @@ const notFound = () => <Image style={{width: 48, height: 48}} source={{ uri: "ht
<Picker notFound={notFound} />
```

## Custom category emojis
You can provide custom emojis for the category anchors. You only need to supply the ones you want changed from the default ones.

```js
import { Picker } from 'emoji-mart'

const categoryEmojis = {
recent: 'fire',
people: 'see_no_evil',
nature: 'beetle',
foods: 'kiwifruit',
activity: 'table_tennis_paddle_and_ball',
places: 'airplane',
objects: 'postal_horn',
symbols: 'copyright',
flags: 'triangular_flag_on_post',
custom: 'hammer_and_wrench',
}

<Picker categoryEmojis={categoryEmojis} />
```

## Headless search
The `Picker` doesn’t have to be mounted for you to take advantage of the advanced search results.

Expand Down
2 changes: 1 addition & 1 deletion dist/components/anchors.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f88a01c

Please sign in to comment.