Skip to content

Commit

Permalink
fix: remove default
Browse files Browse the repository at this point in the history
  • Loading branch information
ValeraS committed Jan 17, 2024
1 parent dbadb3f commit bf1a8d2
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/components/theme/ThemeProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {block, blockNew} from '../utils/cn';

import {ThemeContext} from './ThemeContext';
import {ThemeSettingsContext} from './ThemeSettingsContext';
import type {ThemeSettings} from './ThemeSettingsContext';
import {
DEFAULT_DARK_THEME,
DEFAULT_DIRECTION,
Expand All @@ -12,7 +13,7 @@ import {
ROOT_CLASS_NAME,
} from './constants';
import {updateBodyClassName, updateBodyDirection} from './dom-helpers';
import type {Direction, RealTheme, Theme} from './types';
import type {Direction, RealTheme, Theme, ThemeContextProps} from './types';
import {useSystemTheme} from './useSystemTheme';

const b = block(ROOT_CLASS_NAME);
Expand Down Expand Up @@ -67,17 +68,17 @@ export function ThemeProvider({
}, [scoped, themeValue, direction, nativeScrollbar, rootClassName]);

const contextValue = React.useMemo(
() => ({
theme,
themeValue,
direction,
default: false,
}),
() =>
({
theme,
themeValue,
direction,
} satisfies ThemeContextProps),
[theme, themeValue, direction],
);

const themeSettingsContext = React.useMemo(
() => ({systemLightTheme, systemDarkTheme}),
() => ({systemLightTheme, systemDarkTheme} satisfies ThemeSettings),
[systemLightTheme, systemDarkTheme],
);

Expand Down

0 comments on commit bf1a8d2

Please sign in to comment.