Skip to content

Commit

Permalink
expose step value
Browse files Browse the repository at this point in the history
tbrasington committed Nov 16, 2022
1 parent ac814cb commit e3470db
Showing 6 changed files with 13 additions and 42 deletions.
6 changes: 6 additions & 0 deletions .changeset/quick-spies-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@initiate-ui/typescale-generator": patch
"@initiate-ui/typescale-cli": patch
---

patched in step to object for filtering
41 changes: 0 additions & 41 deletions apps/figma/src/index.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -25,6 +25,7 @@ Object {
"width": 1440,
},
],
"step": -1,
},
"step-0": Object {
"clamp": "clamp(1rem, 0.93rem + 0.36vw, 1.25rem)",
@@ -48,6 +49,7 @@ Object {
"width": 1440,
},
],
"step": 0,
},
"step-1": Object {
"clamp": "clamp(1.07rem, 0.9rem + 0.86vw, 1.67rem)",
@@ -71,6 +73,7 @@ Object {
"width": 1440,
},
],
"step": 1,
},
"step-2": Object {
"clamp": "clamp(1.14rem, 0.83rem + 1.55vw, 2.22rem)",
@@ -94,6 +97,7 @@ Object {
"width": 1440,
},
],
"step": 2,
},
},
}
Original file line number Diff line number Diff line change
@@ -10,5 +10,6 @@ Object {
"width": 320,
},
],
"step": 1,
}
`;
2 changes: 1 addition & 1 deletion packages/typescale-generator/src/utils/interfaces.ts
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ export interface GeneratedNamedScalesProps {


export interface GeneratedItemProps {

step : number,
sizes : ViewPortProps[];
clamp: string;
}
Original file line number Diff line number Diff line change
@@ -63,6 +63,7 @@ export function stepValues({ step, sizes}: {
) : undefined;

return {
step : step,
sizes: values,
clamp: valueMax && max ? clampBuilder(
min.width,

0 comments on commit e3470db

Please sign in to comment.