import { ThemeProps } from '@/themes/types'; function getColors(theme: ThemeProps, color: 'primary' | 'secondary' | 'error' | 'warning' | 'info' | 'success') { switch (color) { case 'secondary': return theme.palette.secondary; case 'error': return theme.palette.error; case 'warning': return theme.palette.warning; case 'info': return theme.palette.info; case 'success': return theme.palette.success; default: return theme.palette.primary; } } export { getColors };