🚸 delete ui

This commit is contained in:
Timur Ercan
2023-02-15 13:33:03 +01:00
parent 6b747b0eb4
commit 0ad1189f4f

View File

@ -5,6 +5,7 @@ import { CircleStackIcon, TrashIcon } from "@heroicons/react/24/solid";
import Logo from "../logo"; import Logo from "../logo";
import { IconButton } from "@documenso/ui"; import { IconButton } from "@documenso/ui";
import toast from "react-hot-toast"; import toast from "react-hot-toast";
import { XCircleIcon } from "@heroicons/react/20/solid";
const stc = require("string-to-color"); const stc = require("string-to-color");
type FieldPropsType = { type FieldPropsType = {
@ -62,12 +63,11 @@ export default function Field(props: FieldPropsType) {
</div> </div>
<strong> <strong>
<IconButton <IconButton
className="absolute top-0 right-0" className="absolute top-0 right-0 -m-5"
icon={TrashIcon} color="secondary"
icon={XCircleIcon}
onClick={(event: any) => { onClick={(event: any) => {
if (confirm("Delete field?")) { props.onDelete(props.field.id);
props.onDelete(props.field.id);
}
}} }}
></IconButton> ></IconButton>
</strong> </strong>