👀 Our most exciting product launch yet 🚀 Join us May 8th for Sanity Connect

Upgraded Sanity Studio v3 and noticed custom icon doesn't have dark mode. Asking for advice on how to handle it.

2 replies
Last updated: Feb 12, 2024
Hi, I just noticed after upgrading sanity studio to v3 that the only custom icon of mine doesn't have a dark mode, unlike others using react-icons.I'm unsure how I should handle this. Any thoughts?
Here's my svg icon:
https://github.com/mvellandi/my-website-sanity-cms/blob/main/schemas/categories/icons.jsx Thanks
Feb 11, 2024, 10:16 PM
It should have fill=“currentColor”. This will inherit the color from the CSS and also handle dark mode. Right now with the lack of color definition it’s defaulting to black. No matter light or dark mode.
Feb 12, 2024, 4:52 AM
Gotcha, thanks - that was really easy!
Feb 12, 2024, 9:04 AM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?