We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent efb8b16 commit 4ff7719Copy full SHA for 4ff7719
src/components/MyPage/MyPage/Temperature/Temperature.tsx
@@ -6,17 +6,17 @@ interface Props {
6
7
function Temperature({ temperature }: Props) {
8
const temperatureColorConditions = [
9
- { max: 10, color: "#7EC7FC" },
10
- { max: 20, color: "#72EF86" },
11
- { max: 36.5, color: "#FFEF5C" },
12
- { max: 65, color: "#FFAD62" },
13
- { max: 100, color: "#E76B6B" },
+ { max: 10, color: "bg-[#7EC7FC]" },
+ { max: 20, color: "bg-[#72EF86]" },
+ { max: 36.5, color: "bg-[#FFEF5C]" },
+ { max: 65, color: "bg-[#FFAD62]" },
+ { max: 100, color: "bg-[#E76B6B]" },
14
];
15
16
const getTemperatureColor = () => {
17
for (const condition of temperatureColorConditions) {
18
if (temperature <= condition.max) {
19
- return `bg-[${condition.color}]`;
+ return condition.color;
20
}
21
22
};
0 commit comments