Skip to content

Commit 6abb6f0

Browse files
committed
Add extra ways to ges the breakpoint values
1 parent efbf8a2 commit 6abb6f0

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

src/fr/breakpoints.ts

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ export const breakpoints = {
4545
},
4646
"values": (() => {
4747
const out = {
48+
...(() => {
49+
const key = "xs" satisfies BreakpointKeys;
50+
51+
return { [key]: `${values[key]}${unit}` as const };
52+
})(),
4853
...(() => {
4954
const key = "sm" satisfies BreakpointKeys;
5055

@@ -65,12 +70,20 @@ export const breakpoints = {
6570

6671
return { [key]: `${values[key]}${unit}` as const };
6772
})()
68-
};
73+
} as const;
6974

70-
assert<Equals<keyof typeof out | "xs", BreakpointKeys>>();
75+
assert<Equals<keyof typeof out, BreakpointKeys>>();
7176

7277
return out;
7378
})(),
79+
"valuesUnit": unit,
80+
"emValues": (()=>{
81+
82+
assert<Equals<typeof unit, "em">>();
83+
84+
return values;
85+
86+
})(),
7487
/**
7588
* Returns the breakpoint values in px.
7689
*

0 commit comments

Comments
 (0)