Skip to content
Snippets Groups Projects
Select Git revision
  • f6cb44b4a64e4081c033e57e962ccf4e06c5aa25
  • main default protected
  • just_for_review
  • 1.0.0
4 results

BlockPlaceholders.jsx

Blame
  • BlockPlaceholders.jsx 547 B
    import {__} from "@wordpress/i18n";
    import {PanelBody} from "@wordpress/components";
    import Placeholder from "./Placeholder";
    
    export default function BlockPlaceholders({placeholders, children}) {
    	return (
    		<PanelBody title={__('Placeholders', 'flexible-invoices-core')}>
    			{children && <p className='fi-placeholders-list-description'>{children}</p>}
    			{
    				placeholders.map((placeholder) => {
    					return <Placeholder key={placeholder.label} label={placeholder.label}>{placeholder.description}</Placeholder>
    				})
    			}
    		</PanelBody>
    	);
    }