UNPKG

@wordpress/block-library

Version:
14 lines (12 loc) 469 B
import clsx from 'clsx'; import { useBlockProps, useInnerBlocksProps } from '@wordpress/block-editor'; export default function save( { attributes, className } ) { const { fontSize, style } = attributes; const blockProps = useBlockProps.save( { className: clsx( className, { 'has-custom-font-size': fontSize || style?.typography?.fontSize, } ), } ); const innerBlocksProps = useInnerBlocksProps.save( blockProps ); return <div { ...innerBlocksProps } />; }