Files
InvokeAI/invokeai/frontend/web/src/theme/space.ts
psychedelicious f0b102d830 feat(ui): ux improvements & redesign
This is a squash merge of a bajillion messy small commits created while iterating on the UI component library and redesign.
2023-12-29 08:26:14 -05:00

19 lines
477 B
TypeScript

const getSpaceValues = (fractionOfDefault = 0.75) => {
const spaceKeys = [
0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 20, 24, 28,
32, 36, 40, 44, 48, 52, 56, 60, 64, 72, 80, 96,
];
const spaceObject = spaceKeys.reduce(
(acc, val) => {
acc[val] = `${val * (0.25 * fractionOfDefault)}rem`;
return acc;
},
{ px: '1px' } as Record<string, string>
);
return spaceObject;
};
export const space = getSpaceValues(0.75);