Compare commits
No commits in common. "d1244444ba2e6fdbe92c091fc9760ce8a6275f37" and "2d4e04211be8d251f34c216bd79a889b8d4c4ee5" have entirely different histories.
d1244444ba
...
2d4e04211b
|
@ -1 +0,0 @@
|
||||||
package-lock.json
|
|
File diff suppressed because it is too large
Load Diff
12
src/index.js
12
src/index.js
|
@ -45,10 +45,6 @@ registerBlockType(`${NAMESPACE}/${SLUG}`, {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
default: 'rgba(0, 0, 0, 1)',
|
default: 'rgba(0, 0, 0, 1)',
|
||||||
},
|
},
|
||||||
toggle: {
|
|
||||||
type: 'boolean',
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
|
||||||
edit({ attributes, setAttributes, className }) {
|
edit({ attributes, setAttributes, className }) {
|
||||||
|
@ -74,11 +70,11 @@ registerBlockType(`${NAMESPACE}/${SLUG}`, {
|
||||||
<ToolbarGroup>
|
<ToolbarGroup>
|
||||||
<ToolbarItem
|
<ToolbarItem
|
||||||
as={Button}
|
as={Button}
|
||||||
onClick={() => {
|
onClick={() =>
|
||||||
setAttributes({ toggle: !attributes.toggle });
|
console.log('Toolbar Button go brrrr!')
|
||||||
}}
|
}
|
||||||
>
|
>
|
||||||
Toggle {attributes.toggle ? 'On' : 'Off'}
|
Toolbar Button
|
||||||
</ToolbarItem>
|
</ToolbarItem>
|
||||||
</ToolbarGroup>
|
</ToolbarGroup>
|
||||||
</BlockControls>
|
</BlockControls>
|
||||||
|
|
Loading…
Reference in New Issue