Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React, { memo } from 'react';
- const Input = memo(({
- value, setter, text, type = 'text'
- }) => {
- const handleChange = (e) => {
- const { value: inputValue } = e.target
- setter(inputValue)
- }
- return (
- <Grid>
- <TextField
- fullWidth
- type={type}
- label={text}
- value={value}
- onChange={handleChange}
- multiline={multiline}
- />
- </Grid>
- )
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement