Skip to content

Commit dffd6f7

Browse files
feat(docs-evergreen): Re-skin alerts (#1279)
* feat(docs-evergreen): Re-skin alerts * fix: Heading colors * fix: New alert boxes icons * fix(docs-evergreen): Dont repeat icons in alerts
1 parent 4569d4f commit dffd6f7

File tree

4 files changed

+60
-46
lines changed

4 files changed

+60
-46
lines changed

_config.yml

+5
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ defaults:
3838
landing: true
3939
layout: integration
4040

41+
premonition:
42+
types:
43+
success:
44+
default_title: "Default title"
45+
4146
plugins_dir: ./_plugins
4247
plugins:
4348
- jekyll-sitemap

src/_sass/_variables.scss

+8
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,18 @@ $color-values: (
3030
code-orange: #f89c56,
3131
code-background: #eceef0,
3232

33+
info-light: #f3f6ff,
3334
info: #3366ff,
35+
info-dark: #2952cc,
36+
success-light: #f5fbf8,
3437
success: #52bd94,
38+
success-dark: #317159,
39+
warning-light: #FFFAF1,
3540
warning: #ffb020,
41+
warning-dark: #996A13,
42+
error-light: #fdf4f4,
3643
error: #d14343,
44+
error-dark: #a73636,
3745

3846
black: #000000,
3947
white: #ffffff

src/_sass/vendors/_premonition.scss

+43-42
Original file line numberDiff line numberDiff line change
@@ -4,74 +4,78 @@
44
grid-template-columns: 30px auto;
55
font-size: 14px;
66
line-height: 22px;
7-
8-
&::before {
9-
content: "";
10-
position: absolute;
11-
top: 0;
12-
left: 0;
13-
height: 100%;
14-
width: 3px;
15-
border-radius: 2px;
16-
}
7+
color: color(gray-700);
8+
border-radius: 8px;
9+
padding: 16px;
10+
border-style: solid;
11+
border-width: 1px;
1712

1813
&.note {
19-
padding: 24px 16px;
14+
padding: 16px 24px;
2015
background-color: color(gray-50);
21-
border-radius: 8px;
16+
border-radius: 0;
17+
border: 0;
2218

2319
.header {
24-
font-size: 20px;
20+
font-size: 16px;
2521
line-height: 24px;
22+
color: color(primary);
2623
}
27-
}
2824

29-
&.info,
30-
&.success,
31-
&.warning,
32-
&.error {
33-
padding: 15px 20px;
34-
background-color: color(gray-50);
35-
border-radius: 4px;
25+
.fa {
26+
background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 0C3.58 0 0 3.58 0 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zM7 3h2v2H7V3zm3 10H6v-1h1V7H6V6h3v6h1v1z' fill='%238F95B2'/%3e%3c/svg%3e");
27+
}
3628
}
3729

3830
&.info {
39-
&::before {
40-
background-color: color(info);
31+
background-color: color(info-light);
32+
border-color: color(info);
33+
34+
.header {
35+
color: color(info-dark);
4136
}
4237

4338
.fa {
44-
background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg viewBox='0 0 16 16' width='16' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M8 0a8 8 0 1 0 8 8 8 8 0 0 0-8-8zm.667 11.333a.667.667 0 0 1-1.334 0V7a.667.667 0 1 1 1.334 0v4.333zm-.667-6a.667.667 0 1 1 .667-.666.667.667 0 0 1-.667.666z' fill='%234286E2' fill-rule='nonzero'/%3e%3c/svg%3e");
39+
background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 0C3.58 0 0 3.58 0 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm1 3v2H7V3h2zm-3 9v1h4v-1H9V6H6v1h1v5H6z' fill='%2336F'/%3e%3c/svg%3e");
4540
}
4641
}
4742

4843
&.success {
49-
&::before {
50-
background-color: color(success);
44+
background-color: color(success-light);
45+
border-color: color(success);
46+
47+
.header {
48+
color: color(success-dark);
5149
}
5250

5351
.fa {
54-
background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg viewBox='0 0 16 16' width='16' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M8 0a8 8 0 1 0 8 8 8 8 0 0 0-8-8zm3.637 6.47l-4 4a.667.667 0 0 1-.94 0L4.363 8.137a.667.667 0 0 1 .94-.94l1.864 1.86 3.53-3.527a.667.667 0 0 1 .94.94z' fill='%231DC989' fill-rule='nonzero'/%3e%3c/svg%3e ");
52+
background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M0 8c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8-8 3.58-8 8zm11.29-2.71a1.003 1.003 0 011.42 1.42l-5 5c-.18.18-.43.29-.71.29-.28 0-.53-.11-.71-.29l-3-3a1.003 1.003 0 011.42-1.42L7 9.59l4.29-4.3z' fill='%2352BD94'/%3e%3c/svg%3e");
5553
}
5654
}
5755

5856
&.warning {
59-
&::before {
60-
background-color: color(warning);
57+
background-color: color(warning-light);
58+
border-color: color(warning);
59+
60+
.header {
61+
color: color(warning-dark);
6162
}
6263

6364
.fa {
64-
background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg viewBox='0 0 16 14' width='16' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M15.728 10.464l-6.31-9.7a1.682 1.682 0 0 0-2.819 0l-6.323 9.7a1.682 1.682 0 0 0 1.406 2.6h12.636a1.682 1.682 0 0 0 1.41-2.6zm-7.736.245a.673.673 0 1 1 .672-.672.673.673 0 0 1-.662.672h-.01zm.672-3.027a.673.673 0 0 1-1.345 0v-3.7a.673.673 0 1 1 1.345 0v3.7z' fill-rule='nonzero' fill='%23F89C56'/%3e%3c/svg%3e");
65+
background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='16' height='14' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M15.845 12.5l.01-.01-6.996-12-.01.01C8.68.2 8.37 0 8 0 7.63 0 7.33.2 7.15.5L7.14.49l-6.995 12 .01.01c-.09.15-.15.31-.15.5 0 .55.45 1 1 1h13.99c.55 0 1-.45 1-1 0-.19-.06-.35-.15-.5zm-6.846-.51H7.001v-2h1.998v2zm-1.998-3h1.998v-5H7.001v5z' fill='%23FFB020'/%3e%3c/svg%3e");
6566
}
6667
}
6768

6869
&.error {
69-
&::before {
70-
background-color: color(error);
70+
background-color: color(error-light);
71+
border-color: color(error);
72+
73+
.header {
74+
color: color(error-dark);
7175
}
7276

7377
.fa {
74-
background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg viewBox='0 0 16 16' width='16' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zm2.143 5a.854.854 0 0 0-.609.249L8 6.79 6.466 5.257A.828.828 0 0 0 5.857 5a.86.86 0 0 0-.608 1.466L6.783 8 5.249 9.534a.86.86 0 0 0 1.217 1.217L8 9.217l1.534 1.534a.86.86 0 0 0 1.217-1.217L9.21 8l1.534-1.534A.828.828 0 0 0 11 5.857.86.86 0 0 0 10.143 5z' fill='%23E73630' fill-rule='nonzero'/%3e%3c/svg%3e");
78+
background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M7.99989 0.00488281C3.58265 0.00488281 0.00488281 3.58265 0.00488281 7.99989C0.00488281 12.4171 3.58265 15.9949 7.99989 15.9949C12.4171 15.9949 15.9949 12.4171 15.9949 7.99989C15.9949 3.58265 12.4171 0.00488281 7.99989 0.00488281ZM7.00051 12.9968V10.998H8.99926V12.9968H7.00051ZM7.00051 3.00301V9.99864H8.99926V3.00301H7.00051Z' fill='%23D14343'/%3e%3c/svg%3e ");
7579
}
7680
}
7781

@@ -81,28 +85,24 @@
8185
margin-top: 4px;
8286
background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M14 0a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h12zM8.192 6.144h-2.73v1.365h2.047v5.462H5.461v1.365h5.462v-1.365H8.875V6.827a.682.682 0 0 0-.683-.683zm0-4.096a1.366 1.366 0 1 0 0 2.732 1.366 1.366 0 0 0 0-2.732z' fill='%231DC989' fill-rule='evenodd'/%3e%3c/svg%3e");
8387
background-position: center;
88+
background-repeat: no-repeat;
8489

8590
&::before {
8691
display: none;
8792
}
8893
}
8994

9095
.header {
91-
font-size: 17px;
96+
font-size: 14px;
9297
font-weight: 500;
93-
line-height: 20px;
94-
color: color(secondary);
95-
96-
@include breakpoint(medium up) {
97-
font-size: 17px;
98-
line-height: 20px;
99-
}
98+
line-height: 24px;
10099
}
101100

102101
.content {
103102
ul {
104103
margin-top: 0px;
105104
}
105+
106106
& > *:not(.header, ul) + * {
107107
margin-top: 25px;
108108
}
@@ -113,7 +113,8 @@
113113

114114
p:first-child {
115115
strong:first-child {
116-
color: color(secondary);
116+
color: color(gray-800);
117+
font-size: 12px;
117118
}
118119
}
119120
}

src/utils/formatguide.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -238,16 +238,16 @@ console.log('example');
238238

239239
## Alerts
240240

241-
> info ""
241+
> info "Info message."
242242
> This is a paragraph showing an information box with a blue information icon. Use this when providing useful details that help a reader understand what's going on, but don't require any immediate action.
243243
244-
> success ""
244+
> success "Success message."
245245
> This is a paragraph showing an information box with a green checkmark icon. Use this when providing helpful information to a reader that could make their lives better, but that isn't required.
246246
247-
> warning ""
247+
> warning "Warning message."
248248
> This is a paragraph showing an information box with an orange warning icon. Use these when you want to caution a reader about something that could have unintended, but not destructive, consequences.
249249
250-
> error ""
250+
> error "Error message."
251251
> This is a paragraph showing an information box with a red hazard icon. Use this when warning a reader about destructive or non-reversible actions, like deleting a workspace or overwriting data. Don't use this too frequently, or else it makes the readers worry!
252252
253253
---

0 commit comments

Comments
 (0)