54 lines
2.0 KiB
TypeScript
54 lines
2.0 KiB
TypeScript
import { Button } from "./ui/button"
|
|
import { DialogBody, DialogCloseTrigger, DialogContent, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger } from "./ui/dialog"
|
|
import { Field, Grid, Input, Stack, Text, Textarea } from "@chakra-ui/react"
|
|
import { FaRegEdit } from "react-icons/fa";
|
|
function EditDetails() {
|
|
return (
|
|
|
|
<DialogRoot placement="center">
|
|
<DialogTrigger asChild>
|
|
<Button bg={"transparent"} size="sm">
|
|
<FaRegEdit style={{ cursor: "pointer", }} color="#000" />
|
|
</Button>
|
|
{/* <Button><FaRegEdit /></Button> */}
|
|
|
|
</DialogTrigger>
|
|
|
|
<DialogContent
|
|
bg={"#fff"}
|
|
w={{ base: "90%", md: "400px" }}
|
|
maxW="90vw"
|
|
h="auto"
|
|
p={4}
|
|
>
|
|
<DialogHeader bg="white" py={3}>
|
|
<DialogTitle alignSelf="center" color="black">Edit Details</DialogTitle>
|
|
</DialogHeader>
|
|
|
|
<DialogBody bg="white">
|
|
<Stack >
|
|
|
|
<Field.Root>
|
|
<Field.Label color="black" pt={2}>Questions</Field.Label>
|
|
<Input placeholder="Questions" bgColor="#EEEEEE" color="black" border="none" pl={2} />
|
|
|
|
<Field.Label color="black" pt={2}>Answer</Field.Label>
|
|
<Textarea placeholder="Answer" bgColor="#EEEEEE" color="black" border="none" pl={2} pt={2} />
|
|
|
|
</Field.Root>
|
|
</Stack>
|
|
</DialogBody>
|
|
<DialogFooter display="flex" justifyContent="center" pt={"5"}>
|
|
<Button w="100%" bg="#02A0A0" color={"#fff"}>
|
|
Save
|
|
</Button>
|
|
</DialogFooter>
|
|
|
|
<DialogCloseTrigger color="black" />
|
|
</DialogContent>
|
|
</DialogRoot >
|
|
|
|
)
|
|
}
|
|
|
|
export default EditDetails |