Demos
Empty
<DataInput.Number onChange={(value) => console.log('onChange', value)} />
Placeholder
<DataInput.Numberplaceholder="Enter a number"onChange={(value) => console.log('onChange', value)}/>
Label
<DataInput.Numberlabel="Label text"onChange={(value) => console.log('onChange', value)}/>
Label and value
<DataInput.Numbervalue={420000}label="Label text"onChange={(value) => console.log('onChange', value)}/>
Disabled
<DataInput.Numbervalue={135}label="Label text"onChange={(value) => console.log('onChange', value)}disabled/>
Info
Useful information (?)
<DataInput.Numbervalue={135}label="Label text"onChange={(value) => console.log('onChange', value)}info="Useful information (?)"/>
Warning
I'm warning you...
<DataInput.Numbervalue={135}label="Label text"onChange={(value) => console.log('onChange', value)}warning={new FormError("I'm warning you...")}/>
Error
This is what is wrong...
<DataInput.Numbervalue={135}label="Label text"onChange={(value) => console.log('onChange', value)}error={new FormError('This is what is wrong...')}/>
Validation - Required
<DataInput.Numbervalue={123}label="Remove and blur field"onChange={(value) => console.log('onChange', value)}required/>
Validation - Minimum
<DataInput.Numbervalue={300}label="Enter a number below 250 and blur to trigger error"onChange={(value) => console.log('onChange', value)}minimum={250}/>
Validation - Maximum and custom error message
<DataInput.Numbervalue={200}label="Enter a number above 250 and blur to trigger error"onChange={(value) => console.log('onChange', value)}maximum={250}errorMessages={{maximum: "You can't enter a number THAR large.. Max 250!",}}/>