UNPKG

norma-library

Version:

Olos/Norma-DS. Design System based on Material UI, developed with TypeScript and Styled Components to create reusable and consistent components in web applications.

73 lines (66 loc) 1.44 kB
function getSize(size: string) { switch (size) { case 'small': return 'text-sm'; case 'medium': return 'text-lg'; case 'large': return 'text-xl'; default: return 'text-base'; } } function getBtnSize(size: string) { switch (size) { case 'small': return 'px-3 py-2 text-xs font-medium'; case 'medium': return 'px-5 py-2.5 text-sm font-medium '; case 'large': return 'px-6 py-3.5 text-base font-medium font-semibold'; default: return 'h-10 py-2 px-4 text-lg'; } } function getPaddingSize(size: string) { switch (size) { case 'small': return 'px-4 py-2.5'; case 'medium': return 'px-5 py-2.5'; case 'large': return 'px-6 py-3'; default: return 'px-5 py-2.5'; } } function getHeightSize(size: string) { switch (size) { case 'small': return 'h-6'; case 'medium': return 'h-10'; case 'large': return '10'; default: return 'h-12'; } } function getIconSize(size: string) { switch (size) { case 'small': return 'px-1.5 py-0 h-6 w-6'; case 'medium': return 'px-1.5 py-0 h-8 w-8'; case 'large': return 'px-1.5 py-0 h-10 w-10'; default: return 'px-1.5 py-0 h-8 w-8'; } } const sizes = { small: 'small', medium: 'medium', large: 'large', }; export { sizes, getBtnSize, getSize, getPaddingSize, getHeightSize, getIconSize };