misc/make-a-wish-ui-improvement

This commit is contained in:
Sheen Capadngan
2024-07-06 01:02:48 +08:00
parent 7add57ae78
commit a5b18cbb72
@@ -2,7 +2,6 @@ import { useForm } from "react-hook-form";
import { faRocketchat } from "@fortawesome/free-brands-svg-icons"; import { faRocketchat } from "@fortawesome/free-brands-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { zodResolver } from "@hookform/resolvers/zod"; import { zodResolver } from "@hookform/resolvers/zod";
import * as PopoverPrimitive from "@radix-ui/react-popover";
import { z } from "zod"; import { z } from "zod";
import { createNotification } from "@app/components/notifications"; import { createNotification } from "@app/components/notifications";
@@ -72,7 +71,7 @@ export const WishForm = () => {
<PopoverContent <PopoverContent
hideCloseBtn hideCloseBtn
align="start" align="start"
alignOffset={25} alignOffset={20}
className="mb-1 w-auto border border-mineshaft-600 bg-mineshaft-900 p-4 drop-shadow-2xl" className="mb-1 w-auto border border-mineshaft-600 bg-mineshaft-900 p-4 drop-shadow-2xl"
sticky="always" sticky="always"
> >
@@ -83,23 +82,19 @@ export const WishForm = () => {
errorText={errors?.text?.message} errorText={errors?.text?.message}
> >
<TextArea <TextArea
className="border border-mineshaft-600 text-sm focus:ring-0" className="border border-mineshaft-600 bg-black/10 text-sm focus:ring-0"
variant="plain" variant="outline"
placeholder="Wish for anything! Help us improve the platform" placeholder="Wish for anything! Help us improve the platform."
reSize="none" reSize="none"
rows={6} rows={6}
cols={40} cols={40}
{...register("text")} {...register("text")}
/> />
</FormControl> </FormControl>
<div className="mt-2 flex justify-between border-t border-mineshaft-500 pt-4"> <div className="flex justify-end pt-2">
<PopoverPrimitive.Close asChild>
<Button className="mr-2 w-min" colorSchema="secondary">
Cancel
</Button>
</PopoverPrimitive.Close>
<Button <Button
className="w-min" className="w-min"
colorSchema="secondary"
type="submit" type="submit"
isLoading={isSubmitting} isLoading={isSubmitting}
disabled={isSubmitting} disabled={isSubmitting}