Skip to content

Commit 4c526d6

Browse files
author
madalingorbanescu
committed
Add labels an modify notice component
1 parent 1095413 commit 4c526d6

File tree

8 files changed

+32
-13
lines changed

8 files changed

+32
-13
lines changed

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/block-editor/src/components/notice/editor-styles.scss

+6
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,14 @@
22
padding: 16px;
33
color: #191e23;
44
background-color: #e7f5f9;
5+
6+
margin-bottom: 24px;
57

68
.components-button {
79
height: auto;
810
}
11+
12+
p:last-child {
13+
margin-bottom: 0;
14+
}
915
}

packages/block-editor/src/components/notice/index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@ const Notice = ( props ) => {
2727
return null;
2828
};
2929

30+
console.log(dismissLabel);
31+
3032
return (
3133
<div className={ 'novablocks-notice' }>
3234
{ content }
33-
<Button isPrimary onClick={ onClick }>{ dismissLabel }</Button>
35+
{ dismissLabel !== undefined && <Button isPrimary onClick={ onClick }>{ dismissLabel }</Button> }
3436
</div>
3537
);
3638
};

packages/block-library/src/blocks/header-row/index.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,14 @@ registerBlockType( 'novablocks/header-row', {
1818
category: 'nova-blocks',
1919
parent: 'novablocks/header',
2020
attributes: {
21-
label: {
21+
name: {
2222
type: 'string',
2323
default: 'Header Row'
2424
},
25+
label: {
26+
type: 'string',
27+
default: 'Header Row Navigation'
28+
},
2529
isSticky: {
2630
type: 'boolean',
2731
default: false,

packages/block-library/src/blocks/header/deprecated.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ const deprecated = [
3737
[
3838
createBlock( 'novablocks/header-row', {
3939
className: 'site-header__row site-header__row--primary',
40-
label: 'primary',
40+
name: 'primary',
41+
label: 'Primary Navigation',
4142
isSticky: headerShouldBeSticky
4243
},
4344
innerBlocks

packages/block-library/src/blocks/header/init.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function novablocks_render_header_block( $attributes, $content ) {
4747
$classes[] = 'site-header--is-old';
4848
}
4949

50-
$header_row_markup_start = '<!-- wp:novablocks/header-row {"label":"primary","isPrimary":true,"className":"site-header__row--dprimary"} -->';
50+
$header_row_markup_start = '<!-- wp:novablocks/header-row {"name":"primary", label="Primary Navigation" isPrimary":true,"className":"site-header__row--primary"} -->';
5151
$header_row_markup_end = '<!-- /wp:novablocks/header-row -->';
5252

5353
global $novablocks_responsive_navigation_outputted;

packages/block-library/src/blocks/header/inspector-controls.js

-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ const HeaderInspectorControls = ( props ) => {
4545
key={ 'header-position-quick-start' }
4646
id={ 'novablocks-header-position-quick-start' }
4747
content={ <p><strong>Quick start:</strong> Set up your header layout using the options below and go to <a href="#">Customizer</a> to change the logo and menu content, or fine-tune styling details. </p> }
48-
dismissLabel={ '✔ Ok, I got it!' }
4948
/>
5049

5150
<RadioControl

packages/block-library/src/blocks/header/variations.js

+14-7
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ const variations = [
99
innerBlocks: [
1010
['novablocks/header-row', {
1111
className: 'site-header__row--primary',
12-
label: 'primary',
12+
name: 'primary',
13+
label: 'Primary Navigation',
1314
isPrimary: true,
1415
},
1516
[
@@ -30,7 +31,8 @@ const variations = [
3031
innerBlocks: [
3132
['novablocks/header-row', {
3233
className: 'site-header__row--primary',
33-
label: 'primary',
34+
name: 'primary',
35+
label: 'Primary Navigation',
3436
isPrimary: true
3537
},
3638
[
@@ -55,7 +57,8 @@ const variations = [
5557
innerBlocks: [
5658
['novablocks/header-row', {
5759
className: 'site-header__row--logo',
58-
label: 'logo',
60+
name: 'logo',
61+
label: 'Site identity(logo)',
5962
},
6063
[
6164
[ 'novablocks/navigation', {
@@ -71,7 +74,8 @@ const variations = [
7174
],
7275
['novablocks/header-row', {
7376
className: 'site-header__row--primary',
74-
label: 'primary',
77+
name: 'primary',
78+
label: 'Primary Navigation',
7579
isPrimary: true
7680
},
7781
[
@@ -91,7 +95,8 @@ const variations = [
9195
innerBlocks: [
9296
['novablocks/header-row', {
9397
className: 'site-header__row--secondary',
94-
label: 'secondary'
98+
name: 'secondary',
99+
label: 'Secondary Navigation',
95100
},
96101
[
97102
[ 'novablocks/navigation', {
@@ -106,15 +111,17 @@ const variations = [
106111
],
107112
['novablocks/header-row', {
108113
className: 'site-header__row--logo',
109-
label: 'logo'
114+
name: 'logo',
115+
label: 'Site identity(logo)',
110116
},
111117
[
112118
['novablocks/logo']
113119
]
114120
],
115121
['novablocks/header-row', {
116122
className: 'site-header__row--primary',
117-
label: 'primary',
123+
name: 'primary',
124+
label: 'Primary Navigation',
118125
isPrimary: true
119126
},
120127
[

0 commit comments

Comments
 (0)