Compare commits

..

No commits in common. "334332a64f50562efd49139dfcd8e005ad77b443" and "18542739f76d7456d86840d84d058ed32a2da1d1" have entirely different histories.

1 changed files with 4 additions and 8 deletions

View File

@ -4,13 +4,9 @@ import './editor.scss';
import { registerBlockType } from '@wordpress/blocks'; import { registerBlockType } from '@wordpress/blocks';
import { __ } from '@wordpress/i18n'; import { __ } from '@wordpress/i18n';
const NAMESPACE = '';
const SLUG = '';
const BLOCK_TITLE= '';
registerBlockType( '<NAMESPACE>/<SLUG>', { // FIXME replace <NAMESPACE>, <SLUG>, <BLOCK TITLE>
registerBlockType( `${NAMESPACE}/${SLUG}`, { title: __( '<BLOCK TITLE>', '<SLUG>' ), // FIXME replace <BLOCK TITLE> ,<SLUG>
title: __( BLOCK_TITLE, SLUG),
category: 'widgets', category: 'widgets',
@ -24,14 +20,14 @@ registerBlockType( `${NAMESPACE}/${SLUG}`, {
type: 'string', type: 'string',
source: 'text', source: 'text',
selector: 'p' selector: 'p'
default: __('A default name', NAMESPACE), default: __('A default name', '<NAMESPACE>'), // FIXME replace <NAMESPACE>
}, },
} }
edit( { attributes, className } ) { edit( { attributes, className } ) {
return ( return (
<p className={ className }> <p className={ className }>
{ attributes.name } { attributes.name }
</p> </p>
); );
}, },