mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-12 05:15:00 +00:00
Update size token function and types
Co-Authored-By: Keith Simmons <keith@the-simmons.net>
This commit is contained in:
parent
0cc5a3839d
commit
607719ed26
1 changed files with 10 additions and 15 deletions
|
@ -66,22 +66,8 @@ export const fontWeights = {
|
|||
}
|
||||
|
||||
// Standard size unit used for paddings, margins, borders, etc.
|
||||
export type Size =
|
||||
| "px"
|
||||
| "xs"
|
||||
| "sm"
|
||||
| "md"
|
||||
| "lg"
|
||||
| "xl";
|
||||
|
||||
export const sizes = {
|
||||
px: 1,
|
||||
xs: 2,
|
||||
sm: 4,
|
||||
md: 6,
|
||||
lg: 8,
|
||||
xl: 12,
|
||||
};
|
||||
export type Size = number
|
||||
|
||||
export type SizeToken = Token<Size, "size">;
|
||||
function size(value: Size): SizeToken {
|
||||
|
@ -91,6 +77,15 @@ function size(value: Size): SizeToken {
|
|||
};
|
||||
}
|
||||
|
||||
export const sizes = {
|
||||
px: size(1),
|
||||
xs: size(2),
|
||||
sm: size(4),
|
||||
md: size(6),
|
||||
lg: size(8),
|
||||
xl: size(12),
|
||||
};
|
||||
|
||||
export type Color = string;
|
||||
export interface ColorToken {
|
||||
value: Color,
|
||||
|
|
Loading…
Reference in a new issue