mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-09-29 22:34:33 +00:00
20 lines
305 B
TypeScript
20 lines
305 B
TypeScript
const SPACES = {
|
|
0: '0',
|
|
0.25: '2px',
|
|
0.5: '4px',
|
|
0.75: '6px',
|
|
1: '8px',
|
|
1.5: '12px',
|
|
2: '16px',
|
|
3: '20px',
|
|
4: '30px',
|
|
} as const;
|
|
|
|
export type ValidSize = keyof typeof SPACES;
|
|
|
|
function space<S extends ValidSize>(size: S): (typeof SPACES)[S] {
|
|
return SPACES[size];
|
|
}
|
|
|
|
export {space};
|