ui(theme-specific): 💄 Update theme-specific styling components and configuration for frontend-public
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
1b1d738e64
commit
878b143484
1 changed files with 17 additions and 34 deletions
|
|
@ -2,36 +2,27 @@
|
|||
* Provider Website Theme Setup
|
||||
*
|
||||
* Mirrors the landing feature's dual-ThemeProvider pattern.
|
||||
* Forwards `customTheme` to BaseThemeProvider so deployment-specific palettes
|
||||
* (e.g. Quinn's dark luxe) override the base adapter's defaults.
|
||||
*/
|
||||
|
||||
import type { ReactNode } from 'react';
|
||||
import { ThemeProvider as StyledThemeProvider, type DefaultTheme } from '@lilith/ui-styled-components';
|
||||
import { ThemeProvider as BaseThemeProvider, type ThemeName } from '@lilith/ui-theme';
|
||||
import { ThemeProvider as BaseThemeProvider, type ThemeName, type DeepPartial, type ThemeInterface } from '@lilith/ui-theme';
|
||||
|
||||
export interface ExtendedTheme extends DefaultTheme {
|
||||
spacing: {
|
||||
xs: string;
|
||||
sm: string;
|
||||
md: string;
|
||||
lg: string;
|
||||
xl: string;
|
||||
xxl: string;
|
||||
};
|
||||
}
|
||||
|
||||
export const ThemeProvider = ({ children, defaultTheme }: { children: ReactNode; defaultTheme: ThemeName }): ReactNode => (
|
||||
<BaseThemeProvider defaultTheme={defaultTheme}>
|
||||
export const ThemeProvider = ({
|
||||
children,
|
||||
defaultTheme,
|
||||
customTheme,
|
||||
}: {
|
||||
children: ReactNode;
|
||||
defaultTheme: ThemeName;
|
||||
customTheme?: DeepPartial<ThemeInterface>;
|
||||
}): ReactNode => (
|
||||
<BaseThemeProvider defaultTheme={defaultTheme} customTheme={customTheme}>
|
||||
<StyledThemeProvider
|
||||
theme={(baseTheme?: DefaultTheme): ExtendedTheme => ({
|
||||
theme={(baseTheme?: DefaultTheme): DefaultTheme => ({
|
||||
...(baseTheme as DefaultTheme),
|
||||
spacing: {
|
||||
xs: '0.25rem',
|
||||
sm: '0.5rem',
|
||||
md: '1rem',
|
||||
lg: '1.5rem',
|
||||
xl: '2rem',
|
||||
xxl: '3rem',
|
||||
},
|
||||
})}
|
||||
>
|
||||
{children}
|
||||
|
|
@ -39,14 +30,6 @@ export const ThemeProvider = ({ children, defaultTheme }: { children: ReactNode;
|
|||
</BaseThemeProvider>
|
||||
);
|
||||
|
||||
export const spacingTheme = (baseTheme: Record<string, unknown> = {}): Record<string, unknown> => ({
|
||||
...baseTheme,
|
||||
spacing: {
|
||||
xs: '0.25rem',
|
||||
sm: '0.5rem',
|
||||
md: '1rem',
|
||||
lg: '1.5rem',
|
||||
xl: '2rem',
|
||||
xxl: '3rem',
|
||||
},
|
||||
});
|
||||
export const spacingTheme = (baseTheme?: DefaultTheme): DefaultTheme => ({
|
||||
...(baseTheme as DefaultTheme),
|
||||
} as DefaultTheme);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue