Skip to content

Commit

Permalink
Feat(web): Switch Item component to v3 design tokens #DS-1451
Browse files Browse the repository at this point in the history
  • Loading branch information
crishpeen committed Sep 17, 2024
1 parent 072a0e7 commit 7d9c721
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 11 deletions.
6 changes: 1 addition & 5 deletions packages/web/src/scss/components/Item/_Item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
}

.Item__label {
@include form-fields.inline-field-label();
@include form-fields.item-label();

grid-column: 2;
}
Expand Down Expand Up @@ -60,10 +60,6 @@
margin-inline-start: theme.$gap;
}

.Item--selected .Item__label {
@include form-fields.item-label-checked();
}

.Item--disabled {
@include form-fields.item-disabled();

Expand Down
9 changes: 5 additions & 4 deletions packages/web/src/scss/components/Item/_theme.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@use '@tokens' as tokens;
@use '@global' as global-tokens;
@use '../../settings/globals';

$gap: tokens.$space-400;
$icon-color-default: tokens.$action-selected-default;
$icon-color-disabled: tokens.$action-selected-disabled;
$gap: global-tokens.$space-500;
$icon-color-default: var(--#{globals.$prefix}color-selected-content-basic);
$icon-color-disabled: var(--#{globals.$prefix}color-disabled-content);
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 @@ -15,7 +15,7 @@
@forward 'Grid';

// @forward 'Header';
// @forward 'Item';
@forward 'Item';
@forward 'Modal';
@forward 'Pagination';
@forward 'PartnerLogo';
Expand Down
2 changes: 2 additions & 0 deletions packages/web/src/scss/tools/_form-fields.scss
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@

@mixin item-label() {
@include typography.generate(form-fields-theme.$item-label-typography);

color: form-fields-theme.$label-color-default;
}

@mixin helper-text() {
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 @@ -13,7 +13,6 @@ const IGNORED_TESTS: string[] = [
'Header',
'Heading',
'Icon',
'Item',
'Link',
'Spinner',
'Stack',
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 7d9c721

Please sign in to comment.