import { __ } from '@wordpress/i18n'; import { AlignmentToolbar, BlockControls, InnerBlocks, RichText, useBlockProps } from '@wordpress/block-editor'; import { useEffect } from '@wordpress/element'; type Attributes = Record; type Props = { attributes: Attributes; setAttributes: (props: Attributes) => Attributes; context: any; }; const faqItemEdit = ({ attributes, setAttributes, context }: Props) => { const blockProps = useBlockProps(); useEffect(() => { setAttributes({ headingColor: context['filter-ai/faqs/heading-color'] }); }, [setAttributes, context]); return ( <> setAttributes({ questionAlign: value })} />
setAttributes({ question: value })} placeholder={__('Question', 'filter-ai')} tagName="h3" style={{ textAlign: attributes.questionAlign as React.CSSProperties['textAlign'], }} />
); }; export default faqItemEdit;