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',
|
||||
default: 'rgba(0, 0, 0, 1)',
|
||||
},
|
||||
toggle: {
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
|
||||
edit({ attributes, setAttributes, className }) {
|
||||
|
@ -74,11 +70,11 @@ registerBlockType(`${NAMESPACE}/${SLUG}`, {
|
|||
<ToolbarGroup>
|
||||
<ToolbarItem
|
||||
as={Button}
|
||||
onClick={() => {
|
||||
setAttributes({ toggle: !attributes.toggle });
|
||||
}}
|
||||
onClick={() =>
|
||||
console.log('Toolbar Button go brrrr!')
|
||||
}
|
||||
>
|
||||
Toggle {attributes.toggle ? 'On' : 'Off'}
|
||||
Toolbar Button
|
||||
</ToolbarItem>
|
||||
</ToolbarGroup>
|
||||
</BlockControls>
|
||||
|
|
Loading…
Reference in New Issue