missive / emoji-mart

🏪 One component to pick them all
https://missiveapp.com/open/emoji-mart
MIT License
8.38k stars 802 forks source link

Add styleProps prop #821

Open 12joan opened 1 year ago

12joan commented 1 year ago

The style injection used in ShadowElement.tsx conflicts with content security policies that disallow inline stylesheets. To facilitate a workaround for this, this PR adds a styleProps prop to PickerProps, each key and value of which is added as a DOM attribute on the injected style element.

TypeScript seems to be disabled for most source files, so I don't know whether I've missed anything important in my implementation. I'll update this PR if I encounter any problems using the patch in production.