| @@ -1,10 +1,10 @@ | ||
| 1 | -import React from 'react'; | |
| 1 | +import { useState } from '@wordpress/element'; | |
| 2 | 2 | |
| 3 | 3 | function InputField( props ) { |
| 4 | 4 | const { attr } = props; |
| 5 | 5 | |
| 6 | - const [ inputvalue, setInputvalue ] = React.useState( props.value ); | |
| 6 | + const [ inputvalue, setInputvalue ] = useState( props.value ); | |
| 7 | 7 | |
| 8 | 8 | function handleChange( e ) { |
| 9 | 9 | setInputvalue( e.target.value ); |
| 10 | 10 | } |
| @@ -22,25 +22,9 @@ | ||
| 22 | 22 | |
| 23 | 23 | <input |
| 24 | 24 | { ...attr } |
| 25 | 25 | type={ type } |
| 26 | - className=" | |
| 27 | - form-control | |
| 28 | - block | |
| 29 | - w-full | |
| 30 | - px-3 | |
| 31 | - py-1.5 | |
| 32 | - text-base | |
| 33 | - font-normal | |
| 34 | - text-gray-700 | |
| 35 | - bg-white bg-clip-padding | |
| 36 | - border border-solid border-gray-300 | |
| 37 | - rounded | |
| 38 | - transition | |
| 39 | - ease-in-out | |
| 40 | - m-0 | |
| 41 | - focus:text-gray-700 focus:bg-white focus:border-blue-600 focus:outline-none | |
| 42 | - " | |
| 26 | + className="form-control block w-full px-3 py-1.5 text-base font-normal text-gray-700 bg-white bg-clip-padding border border-solid border-gray-300 rounded transition ease-in-out m-0 focus:text-gray-700 focus:bg-white focus:border-blue-600 focus:outline-none" | |
| 43 | 27 | name={ props.name } |
| 44 | 28 | value={ inputvalue } |
| 45 | 29 | id={ props.id } |
| 46 | 30 | onChange={ handleChange } |