From e31c5fb9df6e4c49a1cdf05740fc57ba88c8574e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Sworze=C5=84?= Date: Thu, 25 Apr 2024 12:44:45 +0200 Subject: [PATCH 1/2] [#716] change status pill colors --- .../src/components/atoms/StatusPill.tsx | 39 +++++++++---------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/govtool/frontend/src/components/atoms/StatusPill.tsx b/govtool/frontend/src/components/atoms/StatusPill.tsx index e8fbf0377..ae35d1190 100644 --- a/govtool/frontend/src/components/atoms/StatusPill.tsx +++ b/govtool/frontend/src/components/atoms/StatusPill.tsx @@ -5,40 +5,37 @@ import { DRepStatus } from "@/models"; interface StatusPillProps { status: DRepStatus; label?: string; - size?: 'small' | 'medium'; - sx?: ChipProps['sx']; + size?: "small" | "medium"; + sx?: ChipProps["sx"]; } export const StatusPill = ({ status, label = status, - size = 'small', - sx + size = "small", + sx, }: StatusPillProps) => ( - + ); const bgColor = { [DRepStatus.Active]: successGreen.c200, - [DRepStatus.Inactive]: cyan.c100, - [DRepStatus.Retired]: errorRed.c100, + [DRepStatus.Inactive]: errorRed.c100, + [DRepStatus.Retired]: cyan.c100, }; const textColor = { [DRepStatus.Active]: successGreen.c700, - [DRepStatus.Inactive]: cyan.c500, - [DRepStatus.Retired]: errorRed.c500, + [DRepStatus.Inactive]: errorRed.c500, + [DRepStatus.Retired]: cyan.c500, }; -const StyledChip = styled(Chip)<{ status: DRepStatus }>(({ theme, status }) => ({ - backgroundColor: bgColor[status], - color: textColor[status], - border: `2px solid ${theme.palette.neutralWhite}`, - fontSize: '0.75rem', - textTransform: 'capitalize', -})); +const StyledChip = styled(Chip)<{ status: DRepStatus }>( + ({ theme, status }) => ({ + backgroundColor: bgColor[status], + color: textColor[status], + border: `2px solid ${theme.palette.neutralWhite}`, + fontSize: "0.75rem", + textTransform: "capitalize", + }), +); From 6e9f9a7de100329c1c8cbcc5ccca4f6431fe1cf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Sworze=C5=84?= Date: Thu, 25 Apr 2024 13:01:33 +0200 Subject: [PATCH 2/2] [#716] center voting power --- govtool/frontend/src/components/organisms/DRepCard.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/govtool/frontend/src/components/organisms/DRepCard.tsx b/govtool/frontend/src/components/organisms/DRepCard.tsx index f5be3ea28..6ba6b201c 100644 --- a/govtool/frontend/src/components/organisms/DRepCard.tsx +++ b/govtool/frontend/src/components/organisms/DRepCard.tsx @@ -102,8 +102,8 @@ export const DRepCard = ({ - - + +