Skip to content

Commit

Permalink
Match mui/tailwind breakpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
TyHil committed Jan 6, 2025
1 parent 84b6ff5 commit 6183b71
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions src/popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async function checkPermissions() {
}
checkPermissions();

const fullConfig = resolveConfig(tailwindConfig);
const fullTailwindConfig = resolveConfig(tailwindConfig);

function IndexPopup() {
const prefersDarkMode = useMediaQuery('(prefers-color-scheme: dark)');
Expand All @@ -40,19 +40,28 @@ function IndexPopup() {
mode: prefersDarkMode ? 'dark' : 'light',
//copied from tailwind.config.js
primary: {
main: fullConfig.theme.colors.royal,
main: fullTailwindConfig.theme.colors.royal,
},
secondary: {
main: fullConfig.theme.colors.royal,
light: fullConfig.theme.colors.periwinkle,
main: fullTailwindConfig.theme.colors.royal,
light: fullTailwindConfig.theme.colors.periwinkle,
},
error: {
main: fullConfig.theme.colors.persimmon['500'],
main: fullTailwindConfig.theme.colors.persimmon['500'],
},
},
typography: {
fontFamily: 'inherit',
},
breakpoints: {
values: {
xs: 0,
sm: parseInt(fullTailwindConfig.theme.screens.sm),
md: parseInt(fullTailwindConfig.theme.screens.md),
lg: parseInt(fullTailwindConfig.theme.screens.lg),
xl: parseInt(fullTailwindConfig.theme.screens.xl),
},
},
});

return (
Expand Down

0 comments on commit 6183b71

Please sign in to comment.