/
Currency
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
, multiple selections available,