Skip to content

Commit

Permalink
fix(ProductSwitcher): Use color tokens (#1373)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubsikora authored Sep 30, 2024
1 parent dec83dc commit 4fa7348
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export const ProductSwitcher: FC<ProductSwitcherProps> = ({
<Icon
size="xlarge"
source={TextLogoFull}
customColor="var(--content-locked-white)"
customColor="var(--content-basic-primary)"
/>
</a>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const ProductRow: FC<IProps> = ({
icon,
iconColor,
backgroundColors,
borderColor,
notificationCount,
name,
url,
Expand Down Expand Up @@ -56,6 +57,7 @@ export const ProductRow: FC<IProps> = ({
iconColor={iconColor}
expired={expired}
backgroundColors={backgroundColors}
borderColor={borderColor}
notificationCount={notificationCount}
withBorder={isActive}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ $base-class: 'product-tile';
}

.outer-border {
border: solid 2px rgb(255 255 255 / 80%);
border: solid 2px var(--content-basic-primary);
border-radius: 12px;
padding: 3px;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ import styles from './ProductTile.module.scss';

type IProps = Pick<
ProductOption,
'icon' | 'notificationCount' | 'backgroundColors' | 'expired' | 'iconColor'
| 'icon'
| 'notificationCount'
| 'backgroundColors'
| 'expired'
| 'iconColor'
| 'borderColor'
> & {
isMainProduct?: boolean;
withBorder?: boolean;
Expand All @@ -23,6 +28,7 @@ export const ProductTile: FC<IProps> = ({
iconColor,
expired,
backgroundColors,
borderColor,
notificationCount,
withBorder = false,
isMainProduct = false,
Expand Down Expand Up @@ -55,6 +61,7 @@ export const ProductTile: FC<IProps> = ({
background: expired
? 'var(--surface-moderate-default)'
: backgroundColors.main,
border: borderColor ? `1px solid ${borderColor}` : '',
}}
>
{notificationCount && !expired ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ export const ProductSwitcherProducts: ProductOption[] = [
iconColor: 'var(--content-locked-black)',
withDivider: true,
url: '',
borderColor: 'var(--border-basic-secondary)',
},
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export interface ProductOption {
};
withDivider?: boolean;
url: string;
borderColor?: string;
}

export type ProductData = {
Expand Down

0 comments on commit 4fa7348

Please sign in to comment.