Skip to content

Commit

Permalink
Enable mui CSS variables
Browse files Browse the repository at this point in the history
  • Loading branch information
goto-bus-stop committed Sep 12, 2024
1 parent cbd9cfa commit d3f2333
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/password-reset/containers/PasswordResetApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import PasswordResetPage from '../components/PasswordResetPage';
import PasswordResetSuccessPage from '../components/PasswordResetSuccessPage';
import theme from '../../theme';

const muiTheme = createTheme(theme);
const muiTheme = createTheme({ ...theme, cssVariables: true });

// eslint-disable-next-line @typescript-eslint/no-explicit-any
type Translator = any; // from @u-wave/translate
Expand Down
2 changes: 1 addition & 1 deletion src/utils/createTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function blend(a: string, b: string, weight: number) {
}

export default function createTheme(base: ThemeOptions) {
const muiTheme = createMuiTheme(base);
const muiTheme = createMuiTheme({ ...base, cssVariables: true });

const { palette, typography, uwave } = muiTheme;

Expand Down
2 changes: 1 addition & 1 deletion tasks/prerender.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function renderToHtmlThemed(element) {
const wrapped = createElement(
CacheProvider,
{ value: cache },
createElement(ThemeProvider, { theme: createTheme(theme) }, element),
createElement(ThemeProvider, { theme: createTheme({ ...theme, cssVariables: true }) }, element),
);
const html = renderToStaticMarkup(wrapped);
const { css } = extractCritical(html);
Expand Down

0 comments on commit d3f2333

Please sign in to comment.