import React from 'react'
import classes from './Input.module.css'
const Input = (props) => {
return (
<div className={classes.input}>
<label htmlFor={props.input.id}>{props.label}</label>
<input {...props.input}/>
</div>
)
}
export default Input
- Passing from below from another component where input requireed <Input
- label='Amount'
- input={{
- id: 'amount',
- type: 'number',
- min: '1',
- max: '5',
- step: '1',
- defaultValue: '1',
- }}
- />
in
in
No comments:
Post a Comment