initial commit
This commit is contained in:
20
src/utils/getColors.js
Normal file
20
src/utils/getColors.js
Normal file
@@ -0,0 +1,20 @@
|
||||
// ==============================|| CUSTOM FUNCTION - COLORS ||============================== //
|
||||
|
||||
const getColors = (theme, color) => {
|
||||
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 default getColors;
|
||||
Reference in New Issue
Block a user