@wordpress/block-editor 8.5.6 → 8.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/warning/index.js +6 -1
- package/build/components/warning/index.js.map +1 -1
- package/build-module/components/warning/index.js +6 -1
- package/build-module/components/warning/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/warning/index.js +47 -42
- package/src/components/warning/test/__snapshots__/index.js.snap +15 -6
- package/src/components/warning/test/index.js +1 -1
|
@@ -32,6 +32,11 @@ function Warning(_ref) {
|
|
|
32
32
|
secondaryActions
|
|
33
33
|
} = _ref;
|
|
34
34
|
return (0, _element.createElement)("div", {
|
|
35
|
+
style: {
|
|
36
|
+
display: 'contents',
|
|
37
|
+
all: 'initial'
|
|
38
|
+
}
|
|
39
|
+
}, (0, _element.createElement)("div", {
|
|
35
40
|
className: (0, _classnames.default)(className, 'block-editor-warning')
|
|
36
41
|
}, (0, _element.createElement)("div", {
|
|
37
42
|
className: "block-editor-warning__contents"
|
|
@@ -54,7 +59,7 @@ function Warning(_ref) {
|
|
|
54
59
|
}, () => (0, _element.createElement)(_components.MenuGroup, null, secondaryActions.map((item, pos) => (0, _element.createElement)(_components.MenuItem, {
|
|
55
60
|
onClick: item.onClick,
|
|
56
61
|
key: pos
|
|
57
|
-
}, item.title)))))));
|
|
62
|
+
}, item.title))))))));
|
|
58
63
|
}
|
|
59
64
|
/**
|
|
60
65
|
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/warning/README.md
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-editor/src/components/warning/index.js"],"names":["Warning","className","actions","children","secondaryActions","Children","count","map","action","i","moreHorizontal","position","item","pos","onClick","title"],"mappings":";;;;;;;;;AAQA;;AALA;;AAMA;;AACA;;AACA;;AAXA;AACA;AACA;;AAGA;AACA;AACA;AAMA,SAASA,OAAT,OAAuE;AAAA,MAArD;AAAEC,IAAAA,SAAF;AAAaC,IAAAA,OAAb;AAAsBC,IAAAA,QAAtB;AAAgCC,IAAAA;AAAhC,GAAqD;AACtE,SACC;AAAK,IAAA,SAAS,EAAG,
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-editor/src/components/warning/index.js"],"names":["Warning","className","actions","children","secondaryActions","display","all","Children","count","map","action","i","moreHorizontal","position","item","pos","onClick","title"],"mappings":";;;;;;;;;AAQA;;AALA;;AAMA;;AACA;;AACA;;AAXA;AACA;AACA;;AAGA;AACA;AACA;AAMA,SAASA,OAAT,OAAuE;AAAA,MAArD;AAAEC,IAAAA,SAAF;AAAaC,IAAAA,OAAb;AAAsBC,IAAAA,QAAtB;AAAgCC,IAAAA;AAAhC,GAAqD;AACtE,SACC;AAAK,IAAA,KAAK,EAAG;AAAEC,MAAAA,OAAO,EAAE,UAAX;AAAuBC,MAAAA,GAAG,EAAE;AAA5B;AAAb,KACC;AAAK,IAAA,SAAS,EAAG,yBAAYL,SAAZ,EAAuB,sBAAvB;AAAjB,KACC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC;AAAG,IAAA,SAAS,EAAC;AAAb,KACGE,QADH,CADD,EAKG,CAAEI,kBAASC,KAAT,CAAgBN,OAAhB,IAA4B,CAA5B,IAAiCE,gBAAnC,KACD;AAAK,IAAA,SAAS,EAAC;AAAf,KACGG,kBAASC,KAAT,CAAgBN,OAAhB,IAA4B,CAA5B,IACDK,kBAASE,GAAT,CAAcP,OAAd,EAAuB,CAAEQ,MAAF,EAAUC,CAAV,KACtB;AACC,IAAA,GAAG,EAAGA,CADP;AAEC,IAAA,SAAS,EAAC;AAFX,KAIGD,MAJH,CADD,CAFF,EAUGN,gBAAgB,IACjB,4BAAC,wBAAD;AACC,IAAA,SAAS,EAAC,iCADX;AAEC,IAAA,IAAI,EAAGQ,qBAFR;AAGC,IAAA,KAAK,EAAG,cAAI,cAAJ,CAHT;AAIC,IAAA,YAAY,EAAG;AACdC,MAAAA,QAAQ,EAAE,aADI;AAEdZ,MAAAA,SAAS,EACR;AAHa,KAJhB;AASC,IAAA,OAAO;AATR,KAWG,MACD,4BAAC,qBAAD,QACGG,gBAAgB,CAACK,GAAjB,CACD,CAAEK,IAAF,EAAQC,GAAR,KACC,4BAAC,oBAAD;AACC,IAAA,OAAO,EAAGD,IAAI,CAACE,OADhB;AAEC,IAAA,GAAG,EAAGD;AAFP,KAIGD,IAAI,CAACG,KAJR,CAFA,CADH,CAZF,CAXF,CANF,CADD,CADD,CADD;AAqDA;AAED;AACA;AACA;;;eACejB,O","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Children } from '@wordpress/element';\nimport { DropdownMenu, MenuGroup, MenuItem } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { moreHorizontal } from '@wordpress/icons';\n\nfunction Warning( { className, actions, children, secondaryActions } ) {\n\treturn (\n\t\t<div style={ { display: 'contents', all: 'initial' } }>\n\t\t\t<div className={ classnames( className, 'block-editor-warning' ) }>\n\t\t\t\t<div className=\"block-editor-warning__contents\">\n\t\t\t\t\t<p className=\"block-editor-warning__message\">\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</p>\n\n\t\t\t\t\t{ ( Children.count( actions ) > 0 || secondaryActions ) && (\n\t\t\t\t\t\t<div className=\"block-editor-warning__actions\">\n\t\t\t\t\t\t\t{ Children.count( actions ) > 0 &&\n\t\t\t\t\t\t\t\tChildren.map( actions, ( action, i ) => (\n\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\tkey={ i }\n\t\t\t\t\t\t\t\t\t\tclassName=\"block-editor-warning__action\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ action }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t\t{ secondaryActions && (\n\t\t\t\t\t\t\t\t<DropdownMenu\n\t\t\t\t\t\t\t\t\tclassName=\"block-editor-warning__secondary\"\n\t\t\t\t\t\t\t\t\ticon={ moreHorizontal }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'More options' ) }\n\t\t\t\t\t\t\t\t\tpopoverProps={ {\n\t\t\t\t\t\t\t\t\t\tposition: 'bottom left',\n\t\t\t\t\t\t\t\t\t\tclassName:\n\t\t\t\t\t\t\t\t\t\t\t'block-editor-warning__dropdown',\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tnoIcons\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ () => (\n\t\t\t\t\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t\t\t\t\t{ secondaryActions.map(\n\t\t\t\t\t\t\t\t\t\t\t\t( item, pos ) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={ item.onClick }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={ pos }\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ item.title }\n\t\t\t\t\t\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</DropdownMenu>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/warning/README.md\n */\nexport default Warning;\n"]}
|
|
@@ -21,6 +21,11 @@ function Warning(_ref) {
|
|
|
21
21
|
secondaryActions
|
|
22
22
|
} = _ref;
|
|
23
23
|
return createElement("div", {
|
|
24
|
+
style: {
|
|
25
|
+
display: 'contents',
|
|
26
|
+
all: 'initial'
|
|
27
|
+
}
|
|
28
|
+
}, createElement("div", {
|
|
24
29
|
className: classnames(className, 'block-editor-warning')
|
|
25
30
|
}, createElement("div", {
|
|
26
31
|
className: "block-editor-warning__contents"
|
|
@@ -43,7 +48,7 @@ function Warning(_ref) {
|
|
|
43
48
|
}, () => createElement(MenuGroup, null, secondaryActions.map((item, pos) => createElement(MenuItem, {
|
|
44
49
|
onClick: item.onClick,
|
|
45
50
|
key: pos
|
|
46
|
-
}, item.title)))))));
|
|
51
|
+
}, item.title))))))));
|
|
47
52
|
}
|
|
48
53
|
/**
|
|
49
54
|
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/warning/README.md
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-editor/src/components/warning/index.js"],"names":["classnames","Children","DropdownMenu","MenuGroup","MenuItem","__","moreHorizontal","Warning","className","actions","children","secondaryActions","count","map","action","i","position","item","pos","onClick","title"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,QAAT,QAAyB,oBAAzB;AACA,SAASC,YAAT,EAAuBC,SAAvB,EAAkCC,QAAlC,QAAkD,uBAAlD;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,cAAT,QAA+B,kBAA/B;;AAEA,SAASC,OAAT,OAAuE;AAAA,MAArD;AAAEC,IAAAA,SAAF;AAAaC,IAAAA,OAAb;AAAsBC,IAAAA,QAAtB;AAAgCC,IAAAA;AAAhC,GAAqD;AACtE,SACC;AAAK,IAAA,SAAS,
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-editor/src/components/warning/index.js"],"names":["classnames","Children","DropdownMenu","MenuGroup","MenuItem","__","moreHorizontal","Warning","className","actions","children","secondaryActions","display","all","count","map","action","i","position","item","pos","onClick","title"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,QAAT,QAAyB,oBAAzB;AACA,SAASC,YAAT,EAAuBC,SAAvB,EAAkCC,QAAlC,QAAkD,uBAAlD;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,cAAT,QAA+B,kBAA/B;;AAEA,SAASC,OAAT,OAAuE;AAAA,MAArD;AAAEC,IAAAA,SAAF;AAAaC,IAAAA,OAAb;AAAsBC,IAAAA,QAAtB;AAAgCC,IAAAA;AAAhC,GAAqD;AACtE,SACC;AAAK,IAAA,KAAK,EAAG;AAAEC,MAAAA,OAAO,EAAE,UAAX;AAAuBC,MAAAA,GAAG,EAAE;AAA5B;AAAb,KACC;AAAK,IAAA,SAAS,EAAGb,UAAU,CAAEQ,SAAF,EAAa,sBAAb;AAA3B,KACC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC;AAAG,IAAA,SAAS,EAAC;AAAb,KACGE,QADH,CADD,EAKG,CAAET,QAAQ,CAACa,KAAT,CAAgBL,OAAhB,IAA4B,CAA5B,IAAiCE,gBAAnC,KACD;AAAK,IAAA,SAAS,EAAC;AAAf,KACGV,QAAQ,CAACa,KAAT,CAAgBL,OAAhB,IAA4B,CAA5B,IACDR,QAAQ,CAACc,GAAT,CAAcN,OAAd,EAAuB,CAAEO,MAAF,EAAUC,CAAV,KACtB;AACC,IAAA,GAAG,EAAGA,CADP;AAEC,IAAA,SAAS,EAAC;AAFX,KAIGD,MAJH,CADD,CAFF,EAUGL,gBAAgB,IACjB,cAAC,YAAD;AACC,IAAA,SAAS,EAAC,iCADX;AAEC,IAAA,IAAI,EAAGL,cAFR;AAGC,IAAA,KAAK,EAAGD,EAAE,CAAE,cAAF,CAHX;AAIC,IAAA,YAAY,EAAG;AACda,MAAAA,QAAQ,EAAE,aADI;AAEdV,MAAAA,SAAS,EACR;AAHa,KAJhB;AASC,IAAA,OAAO;AATR,KAWG,MACD,cAAC,SAAD,QACGG,gBAAgB,CAACI,GAAjB,CACD,CAAEI,IAAF,EAAQC,GAAR,KACC,cAAC,QAAD;AACC,IAAA,OAAO,EAAGD,IAAI,CAACE,OADhB;AAEC,IAAA,GAAG,EAAGD;AAFP,KAIGD,IAAI,CAACG,KAJR,CAFA,CADH,CAZF,CAXF,CANF,CADD,CADD,CADD;AAqDA;AAED;AACA;AACA;;;AACA,eAAef,OAAf","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Children } from '@wordpress/element';\nimport { DropdownMenu, MenuGroup, MenuItem } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { moreHorizontal } from '@wordpress/icons';\n\nfunction Warning( { className, actions, children, secondaryActions } ) {\n\treturn (\n\t\t<div style={ { display: 'contents', all: 'initial' } }>\n\t\t\t<div className={ classnames( className, 'block-editor-warning' ) }>\n\t\t\t\t<div className=\"block-editor-warning__contents\">\n\t\t\t\t\t<p className=\"block-editor-warning__message\">\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</p>\n\n\t\t\t\t\t{ ( Children.count( actions ) > 0 || secondaryActions ) && (\n\t\t\t\t\t\t<div className=\"block-editor-warning__actions\">\n\t\t\t\t\t\t\t{ Children.count( actions ) > 0 &&\n\t\t\t\t\t\t\t\tChildren.map( actions, ( action, i ) => (\n\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\tkey={ i }\n\t\t\t\t\t\t\t\t\t\tclassName=\"block-editor-warning__action\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ action }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t\t{ secondaryActions && (\n\t\t\t\t\t\t\t\t<DropdownMenu\n\t\t\t\t\t\t\t\t\tclassName=\"block-editor-warning__secondary\"\n\t\t\t\t\t\t\t\t\ticon={ moreHorizontal }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'More options' ) }\n\t\t\t\t\t\t\t\t\tpopoverProps={ {\n\t\t\t\t\t\t\t\t\t\tposition: 'bottom left',\n\t\t\t\t\t\t\t\t\t\tclassName:\n\t\t\t\t\t\t\t\t\t\t\t'block-editor-warning__dropdown',\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tnoIcons\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ () => (\n\t\t\t\t\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t\t\t\t\t{ secondaryActions.map(\n\t\t\t\t\t\t\t\t\t\t\t\t( item, pos ) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={ item.onClick }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={ pos }\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ item.title }\n\t\t\t\t\t\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</DropdownMenu>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/warning/README.md\n */\nexport default Warning;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-editor",
|
|
3
|
-
"version": "8.5.
|
|
3
|
+
"version": "8.5.7",
|
|
4
4
|
"description": "Generic block editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"publishConfig": {
|
|
78
78
|
"access": "public"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "d9042594d77ee2d9e28326266de078a505fdf645"
|
|
81
81
|
}
|
|
@@ -13,50 +13,55 @@ import { moreHorizontal } from '@wordpress/icons';
|
|
|
13
13
|
|
|
14
14
|
function Warning( { className, actions, children, secondaryActions } ) {
|
|
15
15
|
return (
|
|
16
|
-
<div
|
|
17
|
-
<div className=
|
|
18
|
-
<
|
|
16
|
+
<div style={ { display: 'contents', all: 'initial' } }>
|
|
17
|
+
<div className={ classnames( className, 'block-editor-warning' ) }>
|
|
18
|
+
<div className="block-editor-warning__contents">
|
|
19
|
+
<p className="block-editor-warning__message">
|
|
20
|
+
{ children }
|
|
21
|
+
</p>
|
|
19
22
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
{ ( Children.count( actions ) > 0 || secondaryActions ) && (
|
|
24
|
+
<div className="block-editor-warning__actions">
|
|
25
|
+
{ Children.count( actions ) > 0 &&
|
|
26
|
+
Children.map( actions, ( action, i ) => (
|
|
27
|
+
<span
|
|
28
|
+
key={ i }
|
|
29
|
+
className="block-editor-warning__action"
|
|
30
|
+
>
|
|
31
|
+
{ action }
|
|
32
|
+
</span>
|
|
33
|
+
) ) }
|
|
34
|
+
{ secondaryActions && (
|
|
35
|
+
<DropdownMenu
|
|
36
|
+
className="block-editor-warning__secondary"
|
|
37
|
+
icon={ moreHorizontal }
|
|
38
|
+
label={ __( 'More options' ) }
|
|
39
|
+
popoverProps={ {
|
|
40
|
+
position: 'bottom left',
|
|
41
|
+
className:
|
|
42
|
+
'block-editor-warning__dropdown',
|
|
43
|
+
} }
|
|
44
|
+
noIcons
|
|
27
45
|
>
|
|
28
|
-
{
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
onClick={ item.onClick }
|
|
48
|
-
key={ pos }
|
|
49
|
-
>
|
|
50
|
-
{ item.title }
|
|
51
|
-
</MenuItem>
|
|
52
|
-
)
|
|
53
|
-
) }
|
|
54
|
-
</MenuGroup>
|
|
55
|
-
) }
|
|
56
|
-
</DropdownMenu>
|
|
57
|
-
) }
|
|
58
|
-
</div>
|
|
59
|
-
) }
|
|
46
|
+
{ () => (
|
|
47
|
+
<MenuGroup>
|
|
48
|
+
{ secondaryActions.map(
|
|
49
|
+
( item, pos ) => (
|
|
50
|
+
<MenuItem
|
|
51
|
+
onClick={ item.onClick }
|
|
52
|
+
key={ pos }
|
|
53
|
+
>
|
|
54
|
+
{ item.title }
|
|
55
|
+
</MenuItem>
|
|
56
|
+
)
|
|
57
|
+
) }
|
|
58
|
+
</MenuGroup>
|
|
59
|
+
) }
|
|
60
|
+
</DropdownMenu>
|
|
61
|
+
) }
|
|
62
|
+
</div>
|
|
63
|
+
) }
|
|
64
|
+
</div>
|
|
60
65
|
</div>
|
|
61
66
|
</div>
|
|
62
67
|
);
|
|
@@ -2,16 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`Warning should match snapshot 1`] = `
|
|
4
4
|
<div
|
|
5
|
-
|
|
5
|
+
style={
|
|
6
|
+
Object {
|
|
7
|
+
"all": "initial",
|
|
8
|
+
"display": "contents",
|
|
9
|
+
}
|
|
10
|
+
}
|
|
6
11
|
>
|
|
7
12
|
<div
|
|
8
|
-
className="block-editor-
|
|
13
|
+
className="block-editor-warning"
|
|
9
14
|
>
|
|
10
|
-
<
|
|
11
|
-
className="block-editor-
|
|
15
|
+
<div
|
|
16
|
+
className="block-editor-warning__contents"
|
|
12
17
|
>
|
|
13
|
-
|
|
14
|
-
|
|
18
|
+
<p
|
|
19
|
+
className="block-editor-warning__message"
|
|
20
|
+
>
|
|
21
|
+
error
|
|
22
|
+
</p>
|
|
23
|
+
</div>
|
|
15
24
|
</div>
|
|
16
25
|
</div>
|
|
17
26
|
`;
|
|
@@ -18,7 +18,7 @@ describe( 'Warning', () => {
|
|
|
18
18
|
it( 'should have valid class', () => {
|
|
19
19
|
const wrapper = shallow( <Warning /> );
|
|
20
20
|
|
|
21
|
-
expect( wrapper.
|
|
21
|
+
expect( wrapper.find( '.block-editor-warning' ) ).toHaveLength( 1 );
|
|
22
22
|
expect( wrapper.find( '.block-editor-warning__actions' ) ).toHaveLength(
|
|
23
23
|
0
|
|
24
24
|
);
|