-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: dynamically generate utility classes
- Loading branch information
ilkyazarabaci
committed
Oct 8, 2023
1 parent
f2c42fd
commit 39dd043
Showing
5 changed files
with
55 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
const spaces: { | ||
none: "none"; | ||
xxxs: "xxxs"; | ||
xxs: "xxs"; | ||
xs: "xs"; | ||
sm: "sm"; | ||
md: "md"; | ||
lg: "lg"; | ||
xl: "xl"; | ||
xxl: "xxl"; | ||
xxxl: "xxxl"; | ||
} = { | ||
none: "none", | ||
xxxs: "xxxs", | ||
// 4px | ||
xxs: "xxs", | ||
// 8px | ||
xs: "xs", | ||
// 12px | ||
sm: "sm", | ||
// 16px | ||
md: "md", | ||
// 24px | ||
lg: "lg", | ||
// 32px | ||
xl: "xl", | ||
// 48px | ||
xxl: "xxl", | ||
// 72px | ||
xxxl: "xxxl", | ||
}; | ||
|
||
export default Object.freeze(spaces); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
// import Button from "./atoms/Button"; | ||
import Color from "./atoms/Color"; | ||
import Spacing from "./foundation/Spacing"; | ||
|
||
export { Color }; | ||
export { Color, Spacing }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
@import "foundation/all"; | ||
|
||
@each $size, $value in $spacing { | ||
.dse-width-#{$size} { | ||
width: $value; | ||
} | ||
|
||
.dse-height-#{$size} { | ||
height: $value; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters