joeattardi / picmo

JavaScript emoji picker. Any app, any framework.
https://picmojs.com
MIT License
1.19k stars 117 forks source link

Dark theme not working #235

Closed typhoon11 closed 2 years ago

typhoon11 commented 2 years ago

I enabled the dark theme for the picker, but the picker background became completely transparent, but it's okay with a white theme. image

joeattardi commented 2 years ago

Can you share a code example showing the problem? A screenshot is not enough to go by.

typhoon11 commented 2 years ago

Never mind sorry for the late reply. In the documentation it was written that for themes the available strings are lightTheme, darkTheme, autoTheme. So i used as darkTheme string but it was giving a transparent background then I later changed it to dark and it worked, it might be a error in the documentation or I mistaken something.

Screenshot_2022-08-18-19-07-37-544_com.brave.browser.jpg

joeattardi commented 2 years ago

These aren't raw string values, rather they are named exports from the picmo package.

Using the raw string 'dark' does work currently since that's the underlying class name, but if that class name changes in the future it will break for you.

By using the darkTheme export, you'll be guaranteed to always have the correct class name.

joeattardi commented 2 years ago

See https://picmojs.com/docs/usage/themes#specifying-a-theme