Current Path : /storage/v11800/leadideascloud/public_html/wp-content/plugins/leadin/scripts/shared/Form/ |
Linux v11800 5.3.0-1023-aws #25~18.04.1-Ubuntu SMP Fri Jun 5 15:19:18 UTC 2020 aarch64
|
Current File : /storage/v11800/leadideascloud/public_html/wp-content/plugins/leadin/scripts/shared/Form/FormSelector.tsx |
import React from 'react';
import HubspotWrapper from '../Common/HubspotWrapper';
import { pluginPath } from '../../constants/leadinConfig';
import AsyncSelect from '../Common/AsyncSelect';
import { __ } from '@wordpress/i18n';
interface IFormSelectorProps {
loadOptions: Function;
onChange: Function;
value: any;
}
export default function FormSelector({
loadOptions,
onChange,
value,
}: IFormSelectorProps) {
return (
<HubspotWrapper pluginPath={pluginPath}>
<p data-test-id="leadin-form-select">
<b>
{__(
'Select an existing form or create a new one from a template',
'leadin'
)}
</b>
</p>
<AsyncSelect
placeholder={__('Search for a form', 'leadin')}
value={value}
loadOptions={loadOptions}
onChange={onChange}
/>
</HubspotWrapper>
);
}