import { useState } from '@wordpress/element'; function InputField( props ) { const { attr } = props; const [ inputvalue, setInputvalue ] = useState( props.value ); function handleChange( e ) { setInputvalue( e.target.value ); } const type = props.type ? props.type : 'text'; return ( <>