Files
Web-Frontend/client/src/components/Canvas/CanvasComponents/AlertLevelWidget.jsx
T

27 lines
945 B
React
Raw Normal View History

2025-08-04 12:04:33 -07:00
import Widget from "./Widget";
2025-08-05 17:12:59 -07:00
import { HStack, Box, Field, Input, Button } from "@chakra-ui/react";
import { useForm } from "react-hook-form";
2025-08-04 12:04:33 -07:00
export default function AlertLevel({id, isEditable, isDelete, DeleteWidget}) {
2025-08-05 17:12:59 -07:00
const { register, handleSubmit } = useForm();
const onSubmit = (data) => console.log(data);
2025-08-04 12:04:33 -07:00
return (
<Widget id={id} title="Alert Level" isEditable={isEditable} isDelete={isDelete} DeleteWidget={DeleteWidget}>
2025-08-05 17:12:59 -07:00
<Box
as="form"
onSubmit={handleSubmit(onSubmit)}
width="100%"
height="100%"
p={2}
>
<Field.Root orientation="horizontal" align>
<HStack spacing={4} align="center" width="100%">
<Field.Label whiteSpace="nowrap" width="100%">Country Name</Field.Label>
<Input {...register("countryname")} placeholder="Enter country name"/>
</HStack>
</Field.Root>
</Box>
2025-08-04 12:04:33 -07:00
</Widget>
);
}