5E-points-quizz/helpers/getHex.js
2019-09-23 20:14:06 +02:00

32 lines
540 B
JavaScript

import { red, blue, green, yellow, white, noColor } from "./config";
const getHex = (color) => {
let pointColor;
switch (color) {
case "red":
pointColor = red;
break;
case "blue":
pointColor = blue;
break;
case "green":
pointColor = green;
break;
case "yellow":
pointColor = yellow;
break;
case "white":
pointColor = white;
break;
case "blue":
default:
pointColor = noColor;
break;
}
return pointColor;
}
export default getHex;