Skip to content

Commit a8be511

Browse files
committed
Alerts block now shows a preview and the Default style is inserted correctly
Fixes #51 Fixes #50
1 parent e99295e commit a8be511

File tree

6 files changed

+45
-5
lines changed

6 files changed

+45
-5
lines changed

includes/blocks/alerts/block.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
"default": "none"
6262
}
6363
},
64+
"example": {},
6465
"textdomain": "knowledgebase",
6566
"editorScript": "file:./build/index.js",
6667
"editorStyle": "file:./build/index.css",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-element', 'wp-i18n'), 'version' => '2cc1b5a17596e352a502ce29dd0593bf');
1+
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-element', 'wp-i18n'), 'version' => '7f1cb5a1447782de9a9e');

includes/blocks/alerts/build/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

includes/blocks/alerts/build/style-index.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

includes/blocks/alerts/src/style.scss

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,53 +11,87 @@
1111
margin-bottom: 1rem;
1212
border: 1px solid transparent;
1313
border-radius: 0.25rem;
14+
color: #004085;
15+
background-color: #cce5ff;
16+
border-color: #b8daff;
1417

1518
&.is-style-primary {
1619
color: #004085;
1720
background-color: #cce5ff;
1821
border-color: #b8daff;
1922
}
23+
2024
&.is-style-primary hr {
2125
border-top-color: #9fcdff;
2226
}
27+
2328
&.is-style-secondary {
2429
color: #383d41;
2530
background-color: #e2e3e5;
2631
border-color: #d6d8db;
2732
}
33+
2834
&.is-style-secondary hr {
2935
border-top-color: #c8cbcf;
3036
}
37+
38+
&.is-style-success {
39+
color: #155724;
40+
background-color: #d4edda;
41+
border-color: #c3e6cb;
42+
}
43+
44+
&.is-style-success hr {
45+
border-top-color: #b1dfbb;
46+
}
47+
48+
&.is-style-info {
49+
color: #0c5460;
50+
background-color: #d1ecf1;
51+
border-color: #bee5eb;
52+
}
53+
54+
&.is-style-info hr {
55+
border-top-color: #abdde5;
56+
}
57+
3158
&.is-style-warning {
3259
color: #856404;
3360
background-color: #fff3cd;
3461
border-color: #ffeeba;
3562
}
63+
3664
&.is-style-warning hr {
3765
border-top-color: #ffe8a1;
3866
}
67+
3968
&.is-style-danger {
4069
color: #721c24;
4170
background-color: #f8d7da;
4271
border-color: #f5c6cb;
4372
}
73+
4474
&.is-style-danger hr {
4575
border-top-color: #f1b0b7;
4676
}
77+
4778
&.is-style-light {
4879
color: #818182;
4980
background-color: #fefefe;
5081
border-color: #fdfdfe;
5182
}
83+
5284
&.is-style-light hr {
5385
border-top-color: #ececf6;
5486
}
87+
5588
&.is-style-dark {
5689
color: #1b1e21;
5790
background-color: #d6d8d9;
5891
border-color: #c6c8ca;
5992
}
93+
6094
&.is-style-dark hr {
6195
border-top-color: #b9bbbe;
6296
}
63-
}
97+
}

readme.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributors: Ajay, webberzone
33
Donate link: https://ajaydsouza.com/donate/
44
Tags: knowledge base, knowledgebase, FAQ, frequently asked questions, support, documentation
55
Requires at least: 5.6
6-
Tested up to: 6.1
6+
Tested up to: 6.2
77
Requires PHP: 7.1
88
Stable tag: 2.1.2
99
License: GPLv2 or later
@@ -115,6 +115,11 @@ The plugin doesn't have an inbuilt feature to sort posts or sections. You will n
115115

116116
== Changelog ==
117117

118+
= 2.2.0 =
119+
120+
* Enhancements:
121+
* Alerts block now shows a preview and the Default style is inserted correctly
122+
118123
= 2.1.2 =
119124

120125
* Security fix in block

0 commit comments

Comments
 (0)