emoji-picker-react icon indicating copy to clipboard operation
emoji-picker-react copied to clipboard

not working in electron windows.

Open dhananjay0610 opened this issue 1 year ago • 9 comments
trafficstars

we are using <EmojiPicker> inside a project using react.js, we are using this inside a electron window and it isn't working.

dhananjay0610 avatar Nov 30 '23 11:11 dhananjay0610

What do you mean by not working?

ealush avatar Nov 30 '23 13:11 ealush

Screenshot 2023-11-30 at 2 51 41 PM the css isn't working

dhananjay0610 avatar Nov 30 '23 13:11 dhananjay0610

oh my. can you try importing the CSS separately from the dist just to see if it works?

ealush avatar Nov 30 '23 13:11 ealush

Can you try: dist/emoji-picker-react.cjs.development.css if that works for you, I will try to understand how to provide a more reliable style source. I have little experience with electron, so I am not completely certain why it doesn't load the stylesheet.

ealush avatar Nov 30 '23 16:11 ealush

i tried using import 'emoji-picker-react/dist/emoji-picker-react.cjs.development.css';

inside the file where <EmojiPicker is used but don't see any change.still same issue

dhananjay0610 avatar Nov 30 '23 16:11 dhananjay0610

I found this in Electron file :

    • components using CSS/SASS to be loaded by webpack style-loader will not work and should be migrated to chameleon-chakra-ui
    • many features are only supported in Electron environment

dhananjay0610 avatar Nov 30 '23 16:11 dhananjay0610

How do you usually consume styles in your application?

ealush avatar Dec 01 '23 13:12 ealush

using chakra ui

dhananjay0610 avatar Dec 01 '23 14:12 dhananjay0610

Yeah, that might be an issue. The picker is build directly with CSS. What about trying to consume the stylisheet via a style tag as suggested here?

https://stackoverflow.com/questions/61162683/electron-how-to-import-or-include-css-installed-using-npm-package-manager-in-ou

Essentially, we need to find a way to get the picker styles to your application.

ealush avatar Dec 01 '23 14:12 ealush