SHARE
TWEET

Untitled

a guest Jun 16th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import React, { memo } from 'react';
  2.  
  3. const Input = memo(({
  4.   value, setter, text, type = 'text'
  5. }) => {
  6.   const handleChange = (e) => {
  7.     const { value: inputValue } = e.target
  8.     setter(inputValue)
  9.   }
  10.   return (
  11.     <Grid>
  12.       <TextField
  13.         fullWidth
  14.         type={type}
  15.         label={text}
  16.         value={value}
  17.         onChange={handleChange}
  18.         multiline={multiline}
  19.       />
  20.     </Grid>
  21.   )
  22. })
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top