@geist-ui/react
Version:
Modern and minimalist React UI library.
36 lines • 1.01 kB
JavaScript
export var getColors = function getColors(palette, status) {
var colors = {
"default": {
border: palette.border,
borderActive: palette.foreground,
iconBorder: palette.accents_5,
placeholderColor: palette.accents_3
},
secondary: {
border: palette.border,
borderActive: palette.foreground,
iconBorder: palette.accents_5,
placeholderColor: palette.accents_3
},
success: {
border: palette.successLight,
borderActive: palette.successDark,
iconBorder: palette.success,
placeholderColor: palette.accents_3
},
warning: {
border: palette.warningLight,
borderActive: palette.warningDark,
iconBorder: palette.warning,
placeholderColor: palette.accents_3
},
error: {
border: palette.errorLight,
borderActive: palette.errorDark,
iconBorder: palette.error,
placeholderColor: palette.error
}
};
if (!status) return colors["default"];
return colors[status];
};