import clsx from 'clsx'; import { AlignmentControl, BlockControls, Warning, useBlockProps, } from '@wordpress/block-editor'; import { __ } from '@wordpress/i18n'; import { Button } from '@wordpress/components'; import Placeholder from './placeholder'; import type { CommentsEditProps } from '../types'; export default function CommentsLegacy( { attributes, setAttributes, context: { postType, postId }, }: CommentsEditProps ) { const { textAlign } = attributes; const actions = [ , ]; const blockProps = useBlockProps( { className: clsx( { [ `has-text-align-${ textAlign }` ]: textAlign, } ), } ); return ( <> { setAttributes( { textAlign: nextAlign } ); } } />
{ __( 'Comments block: You’re currently using the legacy version of the block. ' + 'The following is just a placeholder - the final styling will likely look different. ' + 'For a better representation and more customization options, ' + 'switch the block to its editable mode.' ) }
); }