Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Alert): ✨ New design and sizes #1804

Merged
merged 8 commits into from
Apr 23, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into alert/new-des
Barsnes authored Apr 16, 2024
commit 817a5a190ca854b0db7e3861c2b988ff8d3c6566
76 changes: 39 additions & 37 deletions packages/css/alert.css
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
.fds-alert {
--fds-alert-border-color: var(--fds-semantic-border-info-default);
--fds-alert-border-radius: var(--fds-border_radius-medium);
--fds-alert-color: var(--fds-semantic-text-neutral-default);
--fds-alert-icon-color: var(--fds-alert-border-color);
--fds-alert-icon-size: var(--fds-sizing-7);
--fds-alert-background: var(--fds-semantic-surface-info-subtle);
--fds-alert-padding: var(--fds-spacing-4);

border: 1px solid var(--fds-alert-border-color);
border-radius: var(--fds-alert-border-radius);
background: var(--fds-alert-background);
color: var(--fds-alert-color);
padding: var(--fds-alert-padding);
display: grid;
grid-auto-flow: column;
grid-auto-columns: min-content auto;
gap: var(--fds-spacing-2);
}
@layer fds.alert {
.fds-alert {
--fds-alert-border-color: var(--fds-semantic-border-info-default);
--fds-alert-border-radius: var(--fds-border_radius-medium);
--fds-alert-color: var(--fds-semantic-text-neutral-default);
--fds-alert-icon-color: var(--fds-alert-border-color);
--fds-alert-icon-size: var(--fds-sizing-7);
--fds-alert-background: var(--fds-semantic-surface-info-subtle);
--fds-alert-padding: var(--fds-spacing-4);

border: 1px solid var(--fds-alert-border-color);
border-radius: var(--fds-alert-border-radius);
background: var(--fds-alert-background);
color: var(--fds-alert-color);
padding: var(--fds-alert-padding);
display: grid;
grid-auto-flow: column;
grid-auto-columns: min-content auto;
gap: var(--fds-spacing-2);
}

.fds-alert__icon {
height: var(--fds-alert-icon-size);
@@ -29,26 +30,27 @@
flex-direction: column;
}

.fds-alert--info {
--fds-alert-border-color: var(--fds-semantic-border-info-default);
--fds-alert-background: var(--fds-semantic-surface-info-subtle);
}
.fds-alert--info {
--fds-alert-border-color: var(--fds-semantic-border-info-default);
--fds-alert-background: var(--fds-semantic-surface-info-subtle);
}

.fds-alert--warning {
--fds-alert-border-color: var(--fds-semantic-border-warning-default);
--fds-alert-background: var(--fds-semantic-surface-warning-subtle);
}
.fds-alert--warning {
--fds-alert-border-color: var(--fds-semantic-border-warning-default);
--fds-alert-background: var(--fds-semantic-surface-warning-subtle);
}

.fds-alert--success {
--fds-alert-border-color: var(--fds-semantic-border-success-default);
--fds-alert-background: var(--fds-semantic-surface-success-subtle);
}
.fds-alert--success {
--fds-alert-border-color: var(--fds-semantic-border-success-default);
--fds-alert-background: var(--fds-semantic-surface-success-subtle);
}

.fds-alert--danger {
--fds-alert-border-color: var(--fds-semantic-border-danger-default);
--fds-alert-background: var(--fds-semantic-surface-danger-subtle);
}
.fds-alert--danger {
--fds-alert-border-color: var(--fds-semantic-border-danger-default);
--fds-alert-background: var(--fds-semantic-surface-danger-subtle);
}

.fds-alert--elevated {
box-shadow: var(--fds-shadow-small);
.fds-alert--elevated {
box-shadow: var(--fds-shadow-small);
}
}

Unchanged files with check annotations Beta

import { Meta, Canvas, Story, ArgTypes } from '@storybook/blocks';

Check warning on line 1 in packages/react-old/src/components/legacy/LegacyPopover/Popover.stories.mdx

GitHub Actions / Builds, lints and tests code

There should be no empty line within import group
import { Button } from '@digdir/designsystemet-react';

Check warning on line 3 in packages/react-old/src/components/legacy/LegacyPopover/Popover.stories.mdx

GitHub Actions / Builds, lints and tests code

There should be at least one empty line between import groups
import { Information } from '../../../../../../docs-components';
import { LegacyPopover } from './index';
You are viewing a condensed version of this merge commit. You can view the full changes here.