Skip to content

Commit

Permalink
fix(FieldNote): fix icon alignment and size issues
Browse files Browse the repository at this point in the history
re: EDS-1372
  • Loading branch information
booc0mtaco committed Jun 20, 2024
1 parent a5b3b47 commit 367717e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/FieldNote/FieldNote.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
*/
.field-note__icon {
position: relative;
flex-shrink: 0;
align-self: flex-start;
margin-top: calc(var(--eds-size-half) / 16 * 1rem);
margin-right: calc(var(--eds-size-half) / 16 * 1rem);
}

Expand Down
8 changes: 8 additions & 0 deletions src/components/FieldNote/FieldNote.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ export const WithErrorIcon: StoryObj<Args> = {
},
};

export const WithLongText: StoryObj<Args> = {
args: {
...WithErrorIcon.args,
children:
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla amet, massa ultricies iaculis. Quam lacus maecenas nibh malesuada. Attristique et ullamcorper rhoncus amet pharetra aliquet tortor. Suscipit dui, nunc sit dui tellus massa laoreet tellus.',
},
};

export const WithWarningIcon: StoryObj<Args> = {
args: {
children: 'This is a fieldnote.',
Expand Down

0 comments on commit 367717e

Please sign in to comment.