// Import block dependencies and components import classnames from 'classnames'; import Inspector from './inspector'; // Import Button settings import CustomButton from './../../../block-button/components/button'; const { __ } = wp.i18n; const { registerBlockType } = wp.blocks; const { compose } = wp.compose; const { Component, Fragment } = wp.element; const { RichText, withFontSizes, withColors, InnerBlocks, URLInput, } = wp.editor; const { IconButton, Dashicon, } = wp.components; class Edit extends Component { constructor() { super( ...arguments ); } render() { // Setup the attributes const { attributes: { subtitle, paddingTop, paddingRight, paddingBottom, paddingLeft, buttonText, buttonUrl, buttonAlignment, buttonBackgroundColor, buttonTextColor, buttonSize, buttonShape, buttonTarget, }, isSelected, className, setAttributes, backgroundColor, } = this.props; // Setup class names const editClassName = classnames( { 'ab-pricing-table-button': true, } ); // Setup styles const editStyles = { backgroundColor: backgroundColor.color, paddingTop: paddingTop ? paddingTop + 'px' : undefined, paddingRight: paddingRight ? paddingRight + 'px' : undefined, paddingBottom: paddingBottom ? paddingBottom + 'px' : undefined, paddingLeft: paddingLeft ? paddingLeft + 'px' : undefined, }; return [
setAttributes( { buttonText: value } ) } /> { isSelected && (
event.preventDefault() } style={ { textAlign: buttonAlignment, } } > setAttributes( { buttonUrl: value } ) } /> ) }
]; } } export default compose( [ withFontSizes( 'fontSize' ), withColors( 'backgroundColor', { textColor: 'color' } ), ] )( Edit );