feat: custom theming enhancements (#8342)
This commit is contained in:
parent
be1113b170
commit
fa63964566
24 changed files with 1203 additions and 465 deletions
21
packages/utils/src/theme-legacy.ts
Normal file
21
packages/utils/src/theme-legacy.ts
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/**
|
||||
* Legacy Theme System
|
||||
*
|
||||
* This file contains the old 5-color theme system for backward compatibility.
|
||||
*
|
||||
* @deprecated Most functions in this file are deprecated
|
||||
* New code should use the OKLCH-based theme system from ./theme/ instead
|
||||
*
|
||||
* Functions:
|
||||
* - applyTheme: OLD 5-color theme system (background, text, primary, sidebarBg, sidebarText)
|
||||
* - unsetCustomCssVariables: Clears both old AND new theme variables (updated for OKLCH)
|
||||
* - resolveGeneralTheme: Utility to resolve theme mode (still useful)
|
||||
* - migrateLegacyTheme: Converts old 5-color theme to new 2-color system
|
||||
*
|
||||
* For new implementations:
|
||||
* - Use: import { applyCustomTheme, clearCustomTheme } from '@plane/utils/theme'
|
||||
* - See: packages/utils/src/theme/theme-application.ts
|
||||
*/
|
||||
|
||||
export const resolveGeneralTheme = (resolvedTheme: string | undefined) =>
|
||||
resolvedTheme?.includes("light") ? "light" : resolvedTheme?.includes("dark") ? "dark" : "system";
|
||||
Loading…
Add table
Add a link
Reference in a new issue