import { __ } from '@wordpress/i18n'; import { InspectorControls, useBlockProps } from '@wordpress/block-editor'; import { PanelBody, ToggleControl } from '@wordpress/components'; export const edit = ( props ) => { const blockProps = useBlockProps(); const { attributes, setAttributes, context } = props; const { lpCourseData } = context; const courseInstructor = lpCourseData?.instructor || 'Instructor'; return ( <> { props.setAttributes( { showText: value ? true : false, } ); } } /> { props.setAttributes( { isLink: value ? true : false, } ); } } /> { props.attributes.isLink ? ( { props.setAttributes( { target: value ? true : false, } ); } } /> ) : ( '' ) }
{ props.attributes.isLink ? ( ) : (
) }
); };