PluginProbe
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce / trunk
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce vtrunk
3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.1 trunk 1.0.4 1.1.0 1.1.0.1 1.1.1 1.1.10 1.1.11 1.1.12 1.1.13 1.1.14 1.1.15 1.1.16 1.1.17 1.1.18 1.1.19 1.1.2 1.1.20 1.1.21 All 160 releases
cartflows / wizard / assets / src / fields / TextField.js

TextField.js in CartFlows – Funnel Builder & Checkout Plugin for WooCommerce trunk, at wizard/assets/src/fields/TextField.js

42 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import React from 'react';
2
3 function InputField( props ) {
4 const { attr } = props;
5
6 const [ inputvalue, setInputvalue ] = React.useState( props.value );
7
8 function handleChange( e ) {
9 setInputvalue( e.target.value );
10 }
11
12 const type = props.type ? props.type : 'text';
13 return (
14 <>
15 <div className="mb-3 xl:w-96">
16 <label
17 htmlFor="exampleFormControlInput1"
18 className="form-label inline-block mb-2 text-gray-700"
19 >
20 { props.label }
21 </label>
22
23 <input
24 { ...attr }
25 type={ type }
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"
27 name={ props.name }
28 value={ inputvalue }
29 id={ props.id }
30 onChange={ handleChange }
31 placeholder={ props.placeholder }
32 min={ props.min }
33 max={ props.max }
34 readOnly={ props.readonly }
35 ></input>
36 </div>
37 </>
38 );
39 }
40
41 export default InputField;
42