Skip to content

Commit

Permalink
swap provider order
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinVandy committed Jan 7, 2024
1 parent afdd20e commit 0bf09ee
Showing 1 changed file with 66 additions and 66 deletions.
132 changes: 66 additions & 66 deletions apps/mantine-react-table-docs/styles/ThemeContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,83 +35,83 @@ export const ThemeContextProvider = ({ children }) => {
}, [darkDark]);

return (
<ThemeContext.Provider
value={{
darkDark,
setDarkDark,
<MantineProvider
theme={createTheme({
colors: darkDark
? {
dark: [
'#C1C2C5',
'#A6A7AB',
'#909296',
'#5c5f66',
'#373A40',
'#2C2E33',
'#25262b',
'#1A1B1E',
'#141517',
'#101113',
],
}
: {},
cursorType: 'pointer',
primaryColor,
setPrimaryColor,
primaryShade,
setPrimaryShade,
}}
>
<MantineProvider
theme={createTheme({
colors: darkDark
? {
dark: [
'#C1C2C5',
'#A6A7AB',
'#909296',
'#5c5f66',
'#373A40',
'#2C2E33',
'#25262b',
'#1A1B1E',
'#141517',
'#101113',
],
}
: {},
cursorType: 'pointer',
primaryColor,
primaryShade,
headings: {
sizes: {
h1: { fontWeight: '100', fontSize: '32px', lineHeight: '1.4' },
h2: { fontSize: '30px', lineHeight: '1.5' },
h3: { fontSize: '26px', lineHeight: '1.5' },
h4: { fontSize: '22px', lineHeight: '1.5' },
h5: { fontSize: '20px', lineHeight: '1.5' },
h6: { fontWeight: '900' },
headings: {
sizes: {
h1: { fontWeight: '100', fontSize: '32px', lineHeight: '1.4' },
h2: { fontSize: '30px', lineHeight: '1.5' },
h3: { fontSize: '26px', lineHeight: '1.5' },
h4: { fontSize: '22px', lineHeight: '1.5' },
h5: { fontSize: '20px', lineHeight: '1.5' },
h6: { fontWeight: '900' },
},
},
components: {
Card: {
defaultProps: {
shadow: 'sm',
withBorder: true,
},
},
components: {
Card: {
defaultProps: {
shadow: 'sm',
withBorder: true,
},
Code: {
defaultProps: {
fz: '0.9em',
},
Code: {
defaultProps: {
fz: '0.9em',
},
Tooltip: {
defaultProps: {
withArrow: true,
portalProps: {
target: '.mantine-tooltips',
},
},
Tooltip: {
defaultProps: {
withArrow: true,
portalProps: {
target: '.mantine-tooltips',
},
},
Tabs: {
styles: () => ({
tab: {
fontSize: '1.1rem',
marginTop: '2rem',
alignItems: 'center',
display: 'flex',
},
},
Tabs: {
styles: () => ({
tab: {
fontSize: '1.1rem',
marginTop: '2rem',
alignItems: 'center',
display: 'flex',
},
}),
},
}),
},
})}
},
})}
>
<ThemeContext.Provider
value={{
darkDark,
setDarkDark,
primaryColor,
setPrimaryColor,
primaryShade,
setPrimaryShade,
}}
>
{children}
</MantineProvider>
</ThemeContext.Provider>
</ThemeContext.Provider>
</MantineProvider>
);
};

Expand Down

0 comments on commit 0bf09ee

Please sign in to comment.