Skip to content

Commit

Permalink
fix(packages/mui-joy/src/GlobalStyles): ensure compatibility with RSC
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuseap committed Sep 13, 2023
1 parent 8255b71 commit c05cc1a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
12 changes: 12 additions & 0 deletions packages/mui-joy/src/GlobalStyles/GlobalStyles.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
'use client';
import * as React from 'react';
import { GlobalStyles as SystemGlobalStyles, GlobalStylesProps } from '@mui/system';
import defaultTheme from '../styles/defaultTheme';
import THEME_ID from '../styles/identifier';
import { Theme } from '../styles/types';

function GlobalStyles(props: GlobalStylesProps<Theme>) {
return <SystemGlobalStyles {...props} defaultTheme={defaultTheme} themeId={THEME_ID} />;
}

export default GlobalStyles;
12 changes: 1 addition & 11 deletions packages/mui-joy/src/GlobalStyles/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1 @@
import * as React from 'react';
import { GlobalStyles as SystemGlobalStyles, GlobalStylesProps } from '@mui/system';
import defaultTheme from '../styles/defaultTheme';
import THEME_ID from '../styles/identifier';
import { Theme } from '../styles/types';

function GlobalStyles(props: GlobalStylesProps<Theme>) {
return <SystemGlobalStyles {...props} defaultTheme={defaultTheme} themeId={THEME_ID} />;
}

export default GlobalStyles;
export * from './GlobalStyles';

0 comments on commit c05cc1a

Please sign in to comment.