diff --git a/src/styles/dimensions.ts b/src/styles/dimensions.ts new file mode 100644 index 0000000..73d0b9c --- /dev/null +++ b/src/styles/dimensions.ts @@ -0,0 +1,30 @@ +export type InputSize = 'small' | 'medium' | 'large'; + +export const applySize = (inputSize?: InputSize) => { + const sizeSpecificStyles = { + small: ` + font-size: 1rem; + border-radius: 0.25rem; + padding: 0.5rem 1rem; + margin: 0.5rem; + `, + medium: ` + font-size: 1.5rem; + border-radius: 0.25rem; + padding: 0.75rem 1.5rem; + margin: 0.5rem; + `, + large: ` + font-size: 2rem; + border-radius: 0.25rem; + padding: 1rem 1.75rem; + margin: 0.5rem; + `, + }; + switch (inputSize) { + case 'small': return sizeSpecificStyles.small; + case 'medium': return sizeSpecificStyles.medium; + case 'large': return sizeSpecificStyles.large; + default: return sizeSpecificStyles.small; + } +};