gulp-wp-block/index.jsx

41 lines
901 B
React
Raw Normal View History

2020-06-29 20:23:42 +00:00
( function( wp ) {
const registerBlockType = wp.blocks.registerBlockType;
const el = wp.element.createElement;
const __ = wp.i18n.__;
registerBlockType( 'room-vw/room-vw-hero', {
title: __( 'RoomWaVW hero block', 'room-vw' ),
category: 'widgets',
supports: {
// Removes support for an HTML mode.
html: false,
},
edit( props ) {
return (
<article className={ props.className }>
<div className='imagecontainer'>
<ul id='js-hero-imgs' className='anim-hero'>
<li><span>Yah from jsx insides the editor</span></li>
</ul>
</div>
</article>
)
},
save() {
return (
<article className='home-hero fixed-full'>
<div className='imagecontainer'>
<ul id='js-hero-imgs' className='anim-hero'>
<li><span>Yah from jsx outsides the editor</span></li>
</ul>
</div>
</article>
)
},
} );
}(
window.wp
) );