feat(theme): add primary-foreground color variable to body styles

This commit is contained in:
icarus 2025-11-01 14:10:56 +08:00
parent c49c592175
commit 44378cc879

View File

@ -14,6 +14,7 @@ export default function useUserTheme() {
const colorPrimary = Color(theme.colorPrimary)
document.body.style.setProperty('--color-primary', colorPrimary.toString())
document.body.style.setProperty('--color-primary-foreground', getForegroundColor(colorPrimary.hex()))
// overwrite hero UI primary color.
document.body.style.setProperty('--primary', colorPrimary.toString())
document.body.style.setProperty('--primary-foreground', getForegroundColor(colorPrimary.hex()))