mirror of
https://github.com/Lissy93/web-check.git
synced 2024-11-22 16:23:56 +01:00
💅 Adds dimensions helper styles
This commit is contained in:
parent
9952e2d955
commit
12500657d5
30
src/styles/dimensions.ts
Normal file
30
src/styles/dimensions.ts
Normal file
@ -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;
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue
Block a user