Input
made with @mui/material/TextField, also inherits all the props of the @mui/material/TextField element.
Props
- label - (required) Label for the input
- name - (required) Name of the input
- type - (not required) Type of the input
- rows - (not required) required if multiline is true;
- multiline - (not required) if true then input will be multiline
- disabled - (not required) if true then input will be disabled
- placeholder - (not required) placeholder for the input
Usage
import { Input } from 'react-componentry'
import { Control } from 'react-hook-form'
const App = () => {
const { control } = useForm()
return (
<Input
control={control}
name="name"
label="Name"
type="text"
placeholder="Enter your name"
/>
)
}