Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. import React, { useState } from "react";
  2. import Dialog from "@material-ui/core/Dialog";
  3. import FormControl from "@material-ui/core/FormControl";
  4. import Button from "@material-ui/core/Button";
  5. import Input from "@material-ui/core/Input";
  6. import InputLabel from "@material-ui/core/InputLabel";
  7.  
  8. const CommentSend = () => {
  9. const [description, setDescription] = useState("");
  10. const [open, setOpen] = useState(false)
  11.  
  12. return (
  13. <form>
  14. <Button
  15. onClick={() => setOpen(true)}
  16. type="submit"
  17. >
  18. Add Comment
  19. </Button>
  20. <Dialog
  21. open={open}
  22. >
  23. <FormControl fullWidth>
  24. <InputLabel htmlFor="comment">Comment</InputLabel>
  25. <Input
  26. id="comment"
  27. onChange={event => setDescription(event.target.value)}
  28. />
  29. </FormControl>
  30. </Dialog>
  31. </form>
  32. );}
  33.  
  34. export default CommentSend;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement