-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #824 from gympass/DS-843
[DS-843] - Typography typing
- Loading branch information
Showing
4 changed files
with
34 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './typography'; | ||
export type { Typography } from './types'; |
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,28 @@ | ||
import { colors, fontSizes, lineHeights } from '@gympass/yoga-tokens'; | ||
|
||
type ColorsValues = typeof colors | string; | ||
type FontSizesValues = typeof fontSizes | string | number; | ||
type LineHeightsValues = typeof lineHeights | string | number; | ||
type TextAlignValues = string; | ||
|
||
type Color = { | ||
color?: ColorsValues; | ||
c?: ColorsValues; | ||
}; | ||
|
||
type FontSize = { | ||
fontSize?: FontSizesValues; | ||
fs?: FontSizesValues; | ||
}; | ||
|
||
type LineHeight = { | ||
lineHeight?: LineHeightsValues; | ||
lh?: LineHeightsValues; | ||
}; | ||
|
||
type TextAlign = { | ||
textAlign?: TextAlignValues; | ||
ta?: TextAlignValues; | ||
}; | ||
|
||
export type Typography = Color & FontSize & LineHeight & TextAlign; |
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
6 changes: 3 additions & 3 deletions
6
packages/system/src/typography.js → packages/system/src/typography/typography.ts
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