Skip to content

Commit

Permalink
Issue #39 - add g attribute to display Gutenberg details.
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbingwide committed May 11, 2021
1 parent 20b3d48 commit 4b1832f
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion blocks/oik-wp/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Implements [wp] shortcode as a server side rendered block
*
* @copyright (C) Copyright Bobbing Wide 2018-2020
* @copyright (C) Copyright Bobbing Wide 2018-2021
* @author Herb Miller @bobbingwide
*/
import './style.scss';
Expand Down Expand Up @@ -65,6 +65,9 @@ export default registerBlockType(
m: {
type: 'string'
},
g: {
type: 'string'
}

},
transforms,
Expand All @@ -80,6 +83,9 @@ export default registerBlockType(
const onChangeM = ( event ) => {
props.setAttributes( { m: event } );
};
const onChangeG = ( event ) => {
props.setAttributes( { g: event } );
};

return [
<InspectorControls >
Expand All @@ -102,6 +108,12 @@ export default registerBlockType(
onChange={ onChangeM }
/>
</PanelRow>
<PanelRow>
<TextControl label="Gutenberg details"
value={ props.attributes.g }
onChange={ onChangeG }
/>
</PanelRow>
</PanelBody>

</InspectorControls>
Expand Down

0 comments on commit 4b1832f

Please sign in to comment.