Skip to content

Commit

Permalink
refactor: centralize screen breakpoints in SCREEN_BREAKDOWNS (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugolxt authored Dec 26, 2024
1 parent e51a849 commit 0be26d2
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/utils/tailwind.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ export type SizingConfig = {

export const variableConfig = generateVariableAssigners();

export const SCREEN_BREAKDOWNS = {
MD: 640,
LG: 1024,
XL: 1536,
XXL: 2065,
};

export const generateTailwindConfig = (fonts?: { title: string[]; text: string[]; mono: string[] }) =>
({
extend: {
Expand Down Expand Up @@ -77,12 +84,9 @@ export const generateTailwindConfig = (fonts?: { title: string[]; text: string[]
colors: {
...variableConfig?.colors,
},
screens: {
md: "640px",
lg: "1024px",
xl: "1536px",
xxl: "2065px",
},
screens: Object.fromEntries(
Object.entries(SCREEN_BREAKDOWNS).map(([key, value]) => [key.toLowerCase(), `${value}px`]),
),
borderRadius: {
0: "0",
full: "100vmax",
Expand Down

0 comments on commit 0be26d2

Please sign in to comment.