UNPKG

@wordpress/block-library

Version:
27 lines (22 loc) 583 B
/** * External dependencies */ import classNames from 'classnames'; /** * WordPress dependencies */ import { InnerBlocks, RichText, useBlockProps } from '@wordpress/block-editor'; export default function save( { attributes } ) { const { align, citation } = attributes; const className = classNames( { [ `has-text-align-${ align }` ]: align, } ); return ( <blockquote { ...useBlockProps.save( { className } ) }> <InnerBlocks.Content /> { ! RichText.isEmpty( citation ) && ( <RichText.Content tagName="cite" value={ citation } /> ) } </blockquote> ); }