Skip to content

Commit

Permalink
small updates to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacharyCrespin committed Aug 7, 2023
1 parent 47a5487 commit 5503722
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,34 @@
# fluentui-emoji-js
### A JavaScript wrapper for Microsoft's [Fluent Emojis](https://github.com/microsoft/fluentui-emoji).

[View on NPM](https://www.npmjs.com/package/fluentui-emoji-js) | [View Live Demo](https://fluentui-emoji-js-demo.netlify.app)
<a href="https://www.npmjs.com/package/fluentui-emoji-js" target="_blank">NPM</a> |
<a href="https://github.com/ZacharyCrespin/fluentui-emoji-js" target="_blank">Github</a> |
<a href="/fluentui-emoji-js/demo" target="_blank">Live Demo</a>

![Fluent Emoji](art/readme_banner.webp)

## Usage
### Install
## Install
```bash
npm install fluentui-emoji-js
```

### Import
## Usage
### Common JS
```js
const emoji = require('fluentui-emoji-js')
// or
import * as emoji from 'fluentui-emoji-js'
```

### Examples
#### Common JS
```cjs
const emoji = require('fluentui-emoji-js')

emoji.fromGlyph('👋','3D').then((emojiFile) => {
console.log(emojiFile)
})
```

#### ES Module
```mjs
### ES Module
```js
import * as emoji from 'fluentui-emoji-js'

const emojiFile = await emoji.fromGlyph('👋','3D')
console.log(emojiFile)
```

## Displaying the emoji
### Displaying the emoji
Both `fromGlyph(glyph, style)` and `fromCode(code, style)` return the location of the emoji image relative to the base emoji folder. You can download the assets folder from the [fluentui-emoji repo](https://github.com/microsoft/fluentui-emoji) or use a service like [jsdelivr](https://jsdelivr.com) to get the emoji image.

#### Getting emoji image via jsdelivr
Expand Down

0 comments on commit 5503722

Please sign in to comment.