/** * External dependencies */ import { __ } from '@wordpress/i18n'; import clsx from 'clsx'; import { HOME_URL } from '@woocommerce/settings'; /** * Internal dependencies */ import './editor.scss'; import './style.scss'; /** * Component displaying a product search form. * * @param {Object} props Incoming props for the component. * @param {Object} props.attributes Incoming block attributes. * @param {string} props.attributes.label * @param {string} props.attributes.placeholder * @param {string} props.attributes.formId * @param {string} props.attributes.className * @param {boolean} props.attributes.hasLabel * @param {string} props.attributes.align */ interface ProductSearchBlockProps { attributes: { label: string; placeholder: string; formId: string; className: string; hasLabel: boolean; align: string; }; } const ProductSearchBlock = ( { attributes: { label, placeholder, formId, className, hasLabel, align }, }: ProductSearchBlockProps ) => { const classes = clsx( 'wc-block-product-search', align ? 'align' + align : '', className ); return (