HEX
Server: LiteSpeed
System: Linux premium212.web-hosting.com 4.18.0-553.124.4.lve.el8.x86_64 #1 SMP Fri May 15 13:02:13 UTC 2026 x86_64
User: vitanhod (1367)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: //home/vitanhod/barnabites.es/wp-content/plugins/rishi-companion/src/admin/blocks/pinterest/Edit.js
import { __ } from "@wordpress/i18n";
import { Fragment } from "@wordpress/element";
import {useBlockProps, InnerBlocks, RichText } from '@wordpress/block-editor';
import BlockInspector from "./Inspector";

export default ({
	attributes,
	setAttributes,
	className,
	isSelected
}) => {
    const {
        pinLabel,
        pinSelector
    } = attributes;

    const TEMPLATE = [
        [ 'core/embed', {} ] 
    ];

	return (
        <div { ...useBlockProps() }>
            <Fragment>          
                <BlockInspector
                    {...{ attributes, setAttributes, className, isSelected }}
                />
                <section id="rishi_pinterest" className="rishi_sidebar_widget_pinterest">                   
                    { pinLabel && 
                        (
                            <RichText
                                placeholder={__("Enter Title Here", "rishi-companion")}
                                value={pinLabel}
                                className="widget-title"
                                tagName={pinSelector}
                                formattingControls={[
                                    "bold",
                                    "italic",
                                    "underline",
                                ]}					
                                onChange={(newLabel) =>
                                    setAttributes({ pinLabel: newLabel })
                                }
                            /> 
                        )
                    }                  
                    <InnerBlocks                   
                        templateLock="all"
                        template={ TEMPLATE }
                    />               
                </section>
            </Fragment>
        </div>
	);
};