Skip to content

Instantly share code, notes, and snippets.

@espenmn
Last active November 17, 2022 17:32
Show Gist options
  • Select an option

  • Save espenmn/84aed78034c88103f6b01f02b7f4f92d to your computer and use it in GitHub Desktop.

Select an option

Save espenmn/84aed78034c88103f6b01f02b7f4f92d to your computer and use it in GitHub Desktop.
edit: ( props ) => {
const { attributes, setAttributes, isSelected } = props;
return (
<Fragment>
<InspectorControls>
<PanelBody
title="Settings for block"
>
<PanelRow >
<TextControl
label="Posts to show"
value={attributes.antall}
onChange={(value ) => { setAttributes({ antall: parseInt(value) }); }}
type="number"
/>
</PanelRow>
</PanelBody>
</InspectorControls>
{ !isSelected && (
<div><p>Render server side</p></div>
)}
</Fragment>
);
},
save: ( props ) => {
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment