Skip to content

Commit 314464f

Browse files
committed
style: AlertFieldLevel - icon centering, margin fix on text
1 parent cee0329 commit 314464f

File tree

2 files changed

+20
-5
lines changed

2 files changed

+20
-5
lines changed

src/components/Alert/Alert.css

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
position: absolute;
66
}
77

8-
.m-notification:not(.m-notification__error, .m-notification__success, .m-notification__warning) .cf-icon-svg {
8+
.m-notification:not(.m-notification__error, .m-notification__success, .m-notification__warning)
9+
.cf-icon-svg {
910
fill: #5a5d61;
1011
}
1112

12-
.cf-icon-svg-wrapper+.m-notification_content {
13+
.cf-icon-svg-wrapper + .m-notification_content {
1314
padding-left: 1.5625em;
1415
}
1516

@@ -20,4 +21,14 @@
2021

2122
.m-notification .m-list .cf-icon-svg-wrapper .cf-icon-svg {
2223
fill: currentcolor;
23-
}
24+
}
25+
26+
.a-alertfieldlevel-text {
27+
display: inline;
28+
margin-left: 0.5em;
29+
}
30+
31+
.a-alertfieldlevel-container {
32+
display: flex;
33+
align-items: center;
34+
}

src/components/Alert/AlertFieldLevel.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { JSXElement } from '~/src/types/jsxElement';
22
import { Icon } from '../Icon/Icon';
3+
import './Alert.css';
34

45
export type AlertFieldLevelType = 'error' | 'info' | 'success' | 'warning';
56

@@ -41,12 +42,15 @@ export const AlertFieldLevel = ({
4142

4243
return (
4344
<div
44-
className={`a-form-alert a-form-alert${AlertFieldLevelClass[status]}`}
45+
className={`a-form-alert a-form-alert${AlertFieldLevelClass[status]} a-alertfieldlevel-container`}
4546
role='alert'
4647
{...properties}
4748
>
4849
<Icon name={MapTypeToIconName[status]} alt={status} withBg />
49-
<span className='a-form-alert_text' data-testid='message'>
50+
<span
51+
className='a-form-alert_text a-alertfieldlevel-text'
52+
data-testid='message'
53+
>
5054
{message}
5155
</span>
5256
</div>

0 commit comments

Comments
 (0)