Skip to content

Instantly share code, notes, and snippets.

@avillegasn
Created March 5, 2018 11:22
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save avillegasn/5d6c7e6ad76e3b9991aa9473af349ec5 to your computer and use it in GitHub Desktop.
save: function( props ) {
var attributes = props.attributes;
var alignment = props.attributes.alignment;
return (
el( 'div', { className: props.className },
attributes.mediaURL &&
el( 'div', { className: 'nelio-testimonial-image', style: { backgroundImage: 'url('+attributes.mediaURL+')' } },
el( 'img', { src: attributes.mediaURL } ),
),
el( 'div', { className: 'nelio-testimonial-content', style: { textAlign: attributes.alignment } },
attributes.testimonial && el( 'p', {}, attributes.testimonial ),
el( 'p', { className: 'nelio-testimonial-name' }, attributes.name ),
attributes.position && el( 'p', { className: 'nelio-testimonial-position' }, attributes.position )
)
)
);
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment