emoji-picker-react 4.19.0 → 4.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -105,6 +105,7 @@ The following is a complete list of all props accepted by `EmojiPicker`.
|
|
|
105
105
|
| `previewConfig` | `PreviewConfig` | `{ showPreview: true }` | Configuration for the bottom preview bar. |
|
|
106
106
|
| `getEmojiUrl` | `(unified: string, style: EmojiStyle) => string` | - | Function to override the default CDN URL for emoji images. |
|
|
107
107
|
| `categoryIcons` | `CategoryIcons` | `{}` | Map `Categories` enum values to custom React nodes for navigation icons. |
|
|
108
|
+
| `nonce` | `string` | `undefined` | Content Security Policy (CSP) nonce for the inline style tag. |
|
|
108
109
|
|
|
109
110
|
### ❤️ Reactions Picker Mode
|
|
110
111
|
|
|
@@ -141,6 +142,14 @@ When passing `customEmojis`, use this format:
|
|
|
141
142
|
|
|
142
143
|
```
|
|
143
144
|
|
|
145
|
+
### Content Security Policy (CSP)
|
|
146
|
+
|
|
147
|
+
If your site has a CSP that blocks inline styles, you can pass a `nonce` to the `EmojiPicker` component. This nonce will be applied to the inline `<style>` tag.
|
|
148
|
+
|
|
149
|
+
```jsx
|
|
150
|
+
<EmojiPicker nonce="your-nonce-value" />
|
|
151
|
+
```
|
|
152
|
+
|
|
144
153
|
### Preview Config
|
|
145
154
|
|
|
146
155
|
Control the footer preview area using `previewConfig`:
|
package/package.json
CHANGED