Skip to content

Commit 5de674d

Browse files
committed
Add .Alert--warning
1 parent 1553841 commit 5de674d

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Read more about [SUIT CSS's design principles](https://github.com/suitcss/suit/)
2121

2222
* `Alert--success` - Applies success colours to the alert
2323
* `Alert--danger` - Applies danger colours to the alert
24+
* `Alert--warning` - Applies warning colours to the alert
2425

2526
## Configurable variables
2627

@@ -36,6 +37,10 @@ Read more about [SUIT CSS's design principles](https://github.com/suitcss/suit/)
3637
* `--Alert--danger-borderColor`
3738
* `--Alert--danger-textColor`
3839

40+
* `--Alert--warning-backgroundColor`
41+
* `--Alert--warning-borderColor`
42+
* `--Alert--warning-textColor`
43+
3944
## Use
4045

4146
Examples:

lib/alert.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
--Alert--danger-backgroundColor: #f8d7da;
1313
--Alert--danger-borderColor: #f5c6cb;
1414
--Alert--danger-textColor: #721c24;
15+
16+
--Alert--warning-backgroundColor: #fff3cd;
17+
--Alert--warning-borderColor: #ffeeba;
18+
--Alert--warning-textColor: #856404;
1519
}
1620

1721
.Alert {
@@ -34,3 +38,9 @@
3438
border-color: var(--Alert--danger-borderColor);
3539
color: var(--Alert--danger-textColor);
3640
}
41+
42+
.Alert--warning {
43+
background-color: var(--Alert--warning-backgroundColor);
44+
border-color: var(--Alert--warning-borderColor);
45+
color: var(--Alert--warning-textColor);
46+
}

test/index.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,12 @@ <h3 class="Test-it">renders with danger modifier</h3>
3030
This is a danger alert.
3131
</div>
3232
</div>
33+
34+
<h3 class="Test-describe">.Alert.Alert--warning</h3>
35+
<h3 class="Test-it">renders with warning modifier</h3>
36+
<div class="Test-run" id="warning">
37+
<div class="Alert Alert--warning">
38+
This is a warning alert.
39+
</div>
40+
</div>
3341
</div>

0 commit comments

Comments
 (0)