Skip to content

Commit

Permalink
BREAKING CHANGE(web): Switch FieldGroup component to v3 design tokens…
Browse files Browse the repository at this point in the history
… and improve alignment #DS-1447

Align FieldGroup fields to start if not fluid.
  • Loading branch information
crishpeen committed Sep 17, 2024
1 parent 2a43cd8 commit 6ae3b38
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
8 changes: 5 additions & 3 deletions packages/web/src/scss/components/FieldGroup/_FieldGroup.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ $_field-name: 'FieldGroup';
.FieldGroup {
@include form-fields-tools.box-field-root();

display: inline-grid;
row-gap: theme.$gap;
border: 0;
}

Expand All @@ -21,13 +19,17 @@ $_field-name: 'FieldGroup';

.FieldGroup__fields {
display: grid;
row-gap: theme.$fields-gap;
row-gap: theme.$gap;
}

.FieldGroup--fluid {
@include form-fields-tools.box-field-fluid();
}

.FieldGroup:not(.FieldGroup--fluid) .FieldGroup__fields {
justify-content: start;
}

.FieldGroup__validationText,
.FieldGroup > [data-spirit-element='validation_text'] {
@include form-fields-tools.validation-text();
Expand Down
5 changes: 2 additions & 3 deletions packages/web/src/scss/components/FieldGroup/_theme.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@use '@tokens' as tokens;
@use '@global' as global-tokens;

$gap: tokens.$space-400;
$fields-gap: tokens.$space-600;
$gap: global-tokens.$space-500;
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 @@ -8,8 +8,8 @@
@forward 'Container';
@forward 'Divider';
@forward 'Dropdown';
@forward 'FieldGroup';

// @forward 'FieldGroup';
// @forward 'FileUploader';
@forward 'Flex';
@forward 'Grid';
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 @@ -8,7 +8,6 @@ import { formatPackageName, getServerUrl, takeScreenshot, waitForPageLoad } from
const IGNORED_TESTS: string[] = [
'Accordion',
'Dropdown',
'FieldGroup',
'FileUploader',
'Header',
'Heading',
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 6ae3b38

Please sign in to comment.