Currency
Description
Currency is an input component that has a constant prefix on the left side.
Â
System Dependencies
Installation
The package can be installed via npm:
npm install empower-inputs --save
Standard Input
Â
Configuration
import { InputSelectionHandler} from 'empower-inputs';
let [formElement, setFormElement] = useState({
sampleCurrency: {
id: 'currency',
type: 'currency',
currency: 'PHP',
label: "Sample Currency",
value: '',
placeholder: '-',
maxLength: 100,
readOnly: false,
disabled: false,
required: true,
},
});
..............
return (
<>
<InputSelectionHandler
config={formElement.sampleCurrency}
customClass="string-custom-class em-input"
onChanged={(e) => inputChangedHandler(e, 'sampleInput')}
keyPressed={(e) => inputChangedHandler(e, 'sampleInput')}
onBlured={(e) => onBluredHandler(e, 'sampleInput')}
/>
</>
)
Â
 Properties
Parent Parameter | Sub Parameter | Data Type | Constraint |
---|---|---|---|
config | Â | JSON Object | Required |
 | id | String | Required |
 | type | String (currency) | Required |
 | currency | String | Required |
 | label | String | Optional |
 | value | String | Required |
 | placeholder | String | Optional |
 | maxLength | Integer | Optional |
 | readOnly | Boolean | Optional |
 | disabled | Boolean | Optional |
 | required | Boolean | Optional |
customClass | Â | String | Optional |
onChanged | Â | Event Method | Required |
keyPressed | Â | Event Method | Optional |
onBlured | Â | Event Method | Optional |
References
Repository Link: https://bitbucket.org/empowerteams/empower-inputs
NPM Package: npm: empower-inputs
Demo Repo: git@bitbucket.org:empowerteams/mfe-sub-application-template.git