import { actionButtonIcon } from 'includes/icons';
import TemplateRender from 'includes/templateRender';
const { __ } = wp.i18n;
const {
PanelBody,
BaseControl,
Icon,
Button,
TextControl,
SelectControl,
ToggleControl,
Flex,
FlexBlock,
FlexItem,
__experimentalInputControl,
__experimentalRadioGroup,
__experimentalRadio,
} = wp.components;
let {
InputControl,
RadioGroup,
Radio
} = wp.components;
InputControl = InputControl || __experimentalInputControl;
RadioGroup = RadioGroup || __experimentalRadioGroup;
Radio = Radio || __experimentalRadio;
const {
registerBlockType
} = wp.blocks;
const {
InspectorControls, MediaUpload, URLInput
} = wp.blockEditor;
const {
RawHTML,
useState
} = wp.element;
if ( 'jet-popup' === window.JetPopupBlockEditorConfig.postType ) {
registerBlockType( 'jet-popup/action-button', {
title: __( 'Popup Action Button' ),
icon: actionButtonIcon,
category: 'layout',
className: 'jet-popup-action-button',
supports: {
html: false
},
attributes: JetPopupBlockEditorConfig.registeredBlockAttrs[ 'action-button' ] || {},
example: {
attributes: {
blockPreview: true,
},
viewportWidth: 625
},
edit: class extends wp.element.Component {
render() {
const props = this.props;
return [
props.isSelected && (
}