Skip to content

Commit 4172a13

Browse files
committed
fix: menu item styling
1 parent cb54a46 commit 4172a13

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

src/components/LanguagePicker/MenuItem.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const MenuItem = forwardRef(({ displayInfo, ...props }: ItemProps, ref) => {
5858
pt="2 !important"
5959
alignItems="start"
6060
borderRadius="base"
61-
bg="transparent"
61+
bg={isCurrent ? "background.base" : "transparent"}
6262
color="body.base"
6363
textDecoration="none"
6464
data-group
@@ -108,7 +108,7 @@ const MenuItem = forwardRef(({ displayInfo, ...props }: ItemProps, ref) => {
108108
{sourceName}
109109
</Text>
110110
</Box>
111-
{isCurrent && <Icon as={BsCheck} fontSize="2xl" />}
111+
{isCurrent && <Icon as={BsCheck} fontSize="2xl" color="primary.highContrast" />}
112112
</Flex>
113113
<Text
114114
textTransform="lowercase"
@@ -119,7 +119,7 @@ const MenuItem = forwardRef(({ displayInfo, ...props }: ItemProps, ref) => {
119119
{progress} {t("page-languages-translated")}{words}{" "}
120120
{t("page-languages-words")}
121121
</Text>
122-
<ProgressBar value={approvalProgress} isCurrent={isCurrent} />
122+
<ProgressBar value={approvalProgress} />
123123
</ChakraMenuItem>
124124
)
125125
})

src/components/LanguagePicker/ProgressBar.tsx

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
11
import { Progress, ProgressProps } from "@chakra-ui/react"
22

3-
type ProgressBarProps = Pick<ProgressProps, "value"> & {
4-
isCurrent?: boolean
5-
}
3+
type ProgressBarProps = Pick<ProgressProps, "value">
64

7-
const ProgressBar = ({ value, isCurrent }: ProgressBarProps) => (
5+
const ProgressBar = ({ value }: ProgressBarProps) => (
86
<Progress
97
value={value}
108
h="0.5"
119
w="full"
1210
bg="body.light"
13-
_groupHover={{
14-
"[role=progressbar]": {
15-
backgroundColor: "primary.highContrast",
16-
},
17-
}}
1811
sx={{
1912
"[role=progressbar]": {
20-
backgroundColor: isCurrent ? "primary.highContrast" : "body.medium",
13+
backgroundColor: "disabled",
2114
},
2215
}}
2316
/>

0 commit comments

Comments
 (0)