Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
wp-content
/
plugins
/
orderable
/
inc
/
modules
/
receipt-layouts
/
blocks
/
order-payment-method
/
src
:
edit.js
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
import { useBlockProps, InspectorControls } from '@wordpress/block-editor'; import { PanelBody, TextControl } from '@wordpress/components'; import { __, sprintf } from '@wordpress/i18n'; export default function Edit( { attributes, setAttributes } ) { return ( <div { ...useBlockProps() }> <InspectorControls> <PanelBody title={ __( 'Content', 'orderable' ) }> <TextControl label={ __( 'Label', 'orderable' ) } placeholder={ __( 'Payment method: ', 'orderable' ) } value={ attributes.label } onChange={ ( value ) => setAttributes( { label: value } ) } /> </PanelBody> </InspectorControls> <span className="wp-block-orderable-receipt-layouts__label"> { attributes.label } </span> { __( 'Direct bank transfer', 'orderable' ) } </div> ); }