foreign-sapphire
foreign-sapphire15mo ago

Referencing theme algorithm in other files

I'm trying to change the color of my logo depending on the selected theme algorithm. I want to check which theme algorithm is chosen inside my themedLayoutV2 swizzled title.tsx file so I can change my logo depending on the app mode.
4 Replies
kapa.ai
kapa.ai15mo ago
Hi @jayp_digitalartist. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
kapa.ai
kapa.ai15mo ago
---------------------- Hmm, I don't know enough to give you a confident answer yet. However, you can refer to the refine documentation (https://refine.dev/docs) for more information on theming and customization. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
Overview | refine
What is refine?
kapa.ai
kapa.ai15mo ago
<@718190521612501134> kapa.ai is still learning and improving, please let us how it did by reacting below
absent-sapphire
absent-sapphire15mo ago
Hi, when you use create refine-app, we provide ColorModeContext provider You get the selected algorithm like this
const { mode, setMode } = useContext(ColorModeContext);
const { mode, setMode } = useContext(ColorModeContext);
mode: "light" is equal to defaultAlgorithm mode: "dark is equal to darkAlgorithm