mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-09 14:59:27 +08:00
feat(theme): add primary-foreground color variable to body styles
This commit is contained in:
parent
c49c592175
commit
44378cc879
@ -14,6 +14,7 @@ export default function useUserTheme() {
|
|||||||
const colorPrimary = Color(theme.colorPrimary)
|
const colorPrimary = Color(theme.colorPrimary)
|
||||||
|
|
||||||
document.body.style.setProperty('--color-primary', colorPrimary.toString())
|
document.body.style.setProperty('--color-primary', colorPrimary.toString())
|
||||||
|
document.body.style.setProperty('--color-primary-foreground', getForegroundColor(colorPrimary.hex()))
|
||||||
// overwrite hero UI primary color.
|
// overwrite hero UI primary color.
|
||||||
document.body.style.setProperty('--primary', colorPrimary.toString())
|
document.body.style.setProperty('--primary', colorPrimary.toString())
|
||||||
document.body.style.setProperty('--primary-foreground', getForegroundColor(colorPrimary.hex()))
|
document.body.style.setProperty('--primary-foreground', getForegroundColor(colorPrimary.hex()))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user