Skip to content

Commit

Permalink
Feat(web): Switch Tabs to v3 design tokens #DS-1444
Browse files Browse the repository at this point in the history
  • Loading branch information
crishpeen committed Aug 29, 2024
1 parent 0a8d7c9 commit d0d619c
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 18 deletions.
15 changes: 9 additions & 6 deletions packages/web/src/scss/components/Tabs/_Tabs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,27 +49,30 @@
@include typography.generate(theme.$item-typography);

padding-block: theme.$link-padding-y;
color: theme.$link-color;
color: theme.$link-color-default;

&:hover {
text-decoration: none;
color: theme.$link-color-hover;
}

&:hover,
&:active {
text-decoration: none;
color: theme.$link-color;
color: theme.$link-color-active;
}
}

.Tabs__link.is-selected {
@include typography.generate(theme.$item-selected-typography);

position: relative;
color: theme.$link-color-selected;

&::after {
content: '';
position: absolute;
bottom: 0;
height: 2px;
border-radius: theme.$item-selected-underline-border-radius;
background: theme.$item-selected-underline-background;
background: currentcolor;
inset-inline: 0;
}
}
22 changes: 12 additions & 10 deletions packages/web/src/scss/components/Tabs/_theme.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
@use '@tokens' as tokens;
@use '@global' as global-tokens;
@use '../../settings/globals';

$breakpoints: tokens.$breakpoints;
$item-padding-x: tokens.$space-600;
$link-padding-y: tokens.$space-400;
$link-color: tokens.$text-primary-default;
$spacing-fallback: tokens.$space-700;
$item-typography: tokens.$body-medium-text-regular;
$item-selected-typography: tokens.$body-medium-text-bold;
$item-selected-underline-background: tokens.$action-selected-default;
$item-selected-underline-border-radius: tokens.$radius-100;
$breakpoints: global-tokens.$breakpoints;
$item-padding-x: global-tokens.$space-700;
$link-padding-y: global-tokens.$space-500;
$link-color-default: var(--#{globals.$prefix}color-action-link-secondary-default);
$link-color-hover: var(--#{globals.$prefix}color-action-link-secondary-hover);
$link-color-active: var(--#{globals.$prefix}color-action-link-secondary-active);
$link-color-selected: $link-color-active;
$spacing-fallback: global-tokens.$space-900;
$item-typography: global-tokens.$body-3-semibold;
$item-selected-underline-border-radius: global-tokens.$radius-100;
2 changes: 1 addition & 1 deletion packages/web/src/scss/components/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
// @forward 'ScrollView';
// @forward 'Select';
@forward 'Stack';
@forward 'Tabs';

// @forward 'Tabs';
// @forward 'Tag';
// @forward 'TextArea';
// @forward 'TextField';
Expand Down
1 change: 0 additions & 1 deletion tests/e2e/demo-components-compare.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const IGNORED_TESTS: string[] = [
'Select',
'Spinner',
'Stack',
'Tabs',
'Tag',
'Text',
'TextArea',
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d0d619c

Please sign in to comment.