Skip to content

Commit f13658c

Browse files
authored
feat(breadcrumbs): use css variables for colors (#382)
* feat(tag): use css variables in variants * feat(selectlist): use css variables in variants * feat(breadcrumbs): use css variables for colors
1 parent e11833c commit f13658c

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/components/Breadcrumbs/Breadcrumbs.tsx

+10-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import styled from 'styled-components';
44
import { ChevronRightIcon } from '../../icons';
55
import { Text } from '../Text/Text';
66

7-
import { Colors } from '../../essentials';
87
import { theme } from '../../essentials/theme';
98
import { get } from '../../utils/themeGet';
109
import { Box } from '../Box/Box';
10+
import { getSemanticValue } from '../../utils/cssVariables';
1111

1212
interface InvertedStyle {
1313
/**
@@ -53,7 +53,7 @@ const Breadcrumbs = ({ children, inverted }: BreadcrumbsProps): JSX.Element => {
5353
</nav>
5454
{index < arrayChildren.length - 1 ? (
5555
<Box height={16} mt="0.125rem">
56-
<ChevronRightIcon size={16} color={Colors.AUTHENTIC_BLUE_350} />
56+
<ChevronRightIcon size={16} color={getSemanticValue('foreground-neutral-default')} />
5757
</Box>
5858
) : // eslint-disable-next-line unicorn/no-null
5959
null}
@@ -65,7 +65,10 @@ const Breadcrumbs = ({ children, inverted }: BreadcrumbsProps): JSX.Element => {
6565

6666
const Link = styled.a.attrs({ theme })<LinkProps>`
6767
display: inline-block;
68-
color: ${p => (p.inverted ? Colors.WHITE : Colors.ACTION_BLUE_900)};
68+
color: ${p =>
69+
p.inverted
70+
? getSemanticValue('foreground-on-background-primary')
71+
: getSemanticValue('foreground-accent-default')};
6972
cursor: pointer;
7073
line-height: 1.4;
7174
font-family: ${get('fonts.normal')};
@@ -75,7 +78,10 @@ const Link = styled.a.attrs({ theme })<LinkProps>`
7578
7679
&:hover,
7780
&:active {
78-
color: ${p => (p.inverted ? Colors.AUTHENTIC_BLUE_350 : Colors.ACTION_BLUE_1000)};
81+
color: ${p =>
82+
p.inverted
83+
? getSemanticValue('foreground-neutral-default')
84+
: getSemanticValue('foreground-accent-emphasized')};
7985
text-decoration: underline;
8086
}
8187
`;

0 commit comments

Comments
 (0)