Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React, { useState } from "react";
- import Dialog from "@material-ui/core/Dialog";
- import FormControl from "@material-ui/core/FormControl";
- import Button from "@material-ui/core/Button";
- import Input from "@material-ui/core/Input";
- import InputLabel from "@material-ui/core/InputLabel";
- const CommentSend = () => {
- const [description, setDescription] = useState("");
- const [open, setOpen] = useState(false)
- return (
- <form>
- <Button
- onClick={() => setOpen(true)}
- type="submit"
- >
- Add Comment
- </Button>
- <Dialog
- open={open}
- >
- <FormControl fullWidth>
- <InputLabel htmlFor="comment">Comment</InputLabel>
- <Input
- id="comment"
- onChange={event => setDescription(event.target.value)}
- />
- </FormControl>
- </Dialog>
- </form>
- );}
- export default CommentSend;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement