Skip to content

Commit

Permalink
fix: Remove duplicate color names #2350
Browse files Browse the repository at this point in the history
  • Loading branch information
Devansh633 committed Feb 10, 2025
1 parent 6749f40 commit 69898a1
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/data/countries.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const COUNTRY_BASELINE_POLICIES = {
};

export const STATUS_COLORS = {
OK: colors.BLUE_95,
OK: colors.BLUE_LIGHT,
ERROR: colors.DARK_RED,
Pending: colors.LIGHT_GRAY,
};
Expand Down
12 changes: 3 additions & 9 deletions src/layout/Section.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ export default function Section({
}[displayCategory];
let titleColor = null;
if (
[style.colors.BLUE, style.colors.BLUE_PRESSED].includes(
backgroundColor,
)
[style.colors.BLUE, style.colors.BLUE_PRESSED].includes(backgroundColor)
) {
titleColor = style.colors.WHITE;
}
Expand Down Expand Up @@ -87,9 +85,7 @@ export function SectionTop({ height, backgroundColor, title }) {
}[displayCategory];
let titleColor = null;
if (
[style.colors.BLUE, style.colors.BLUE_PRESSED].includes(
backgroundColor,
)
[style.colors.BLUE, style.colors.BLUE_PRESSED].includes(backgroundColor)
) {
titleColor = style.colors.WHITE;
}
Expand Down Expand Up @@ -135,9 +131,7 @@ export function SectionBottom({ height, backgroundColor, children }) {
}[displayCategory];
let titleColor = null;
if (
[style.colors.BLUE, style.colors.BLUE_PRESSED].includes(
backgroundColor,
)
[style.colors.BLUE, style.colors.BLUE_PRESSED].includes(backgroundColor)
) {
titleColor = style.colors.WHITE;
}
Expand Down
5 changes: 1 addition & 4 deletions src/pages/Donate.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,7 @@ export default function Donate() {
</Section>

{/* Donate Online Section */}
<Section
backgroundColor={style.colors.BLUE}
title="How to Donate"
>
<Section backgroundColor={style.colors.BLUE} title="How to Donate">
<div
style={{
display: "flex",
Expand Down
2 changes: 1 addition & 1 deletion src/pages/policy/output/decile/IntraDecileImpact.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function ImpactPlot(props) {

const colorMap = {
"Gain more than 5%": style.colors.BLUE,
"Gain less than 5%": style.colors.BLUE_95,
"Gain less than 5%": style.colors.BLUE_LIGHT,
"No change": style.colors.LIGHT_GRAY,
"Lose less than 5%": style.colors.MEDIUM_LIGHT_GRAY,
"Lose more than 5%": style.colors.DARK_GRAY,
Expand Down
2 changes: 0 additions & 2 deletions src/style/colors.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const BLACK = "#000000";
const BLUE_95 = "#D8E6F3";
const BLUE_98 = "#F7FAFD";
const BLUE = "#2C6496";
const BLUE_LIGHT = "#D8E6F3";
Expand All @@ -20,7 +19,6 @@ const WHITE = "#FFFFFF";

const colors = {
BLACK,
BLUE_95,
BLUE_98,
BLUE,
BLUE_LIGHT,
Expand Down

0 comments on commit 69898a1

Please sign in to comment.