@@ -5,7 +5,12 @@ import React, { useState, useEffect, Fragment, useRef } from "react";
55import { useForm } from "react-hook-form" ;
66import CustomTextareaAutosize from "@/components/CustomTextareAutosize/CustomTextareaAutosize" ;
77import { toast } from "sonner" ;
8- import { Disclosure , Transition } from "@headlessui/react" ;
8+ import {
9+ Disclosure ,
10+ DisclosureButton ,
11+ DisclosurePanel ,
12+ Transition ,
13+ } from "@headlessui/react" ;
914import { ChevronUpIcon } from "@heroicons/react/20/solid" ;
1015import type { SavePostInput } from "@/schema/post" ;
1116import { ConfirmPostSchema } from "@/schema/post" ;
@@ -363,7 +368,7 @@ const Create = ({ session }: { session: Session }) => {
363368 return (
364369 < >
365370 < form onSubmit = { handleSubmit ( onSubmit ) } >
366- < Transition . Root show = { open } as = { Fragment } >
371+ < Transition show = { open } as = { Fragment } >
367372 < div className = "fixed bottom-0 left-0 top-0 z-50 h-screen w-full overflow-y-scroll bg-white dark:bg-black" >
368373 < div className = "m-2 max-w-full" >
369374 < button
@@ -484,15 +489,15 @@ const Create = ({ session }: { session: Session }) => {
484489 < Disclosure >
485490 { ( { open } ) => (
486491 < >
487- < Disclosure . Button className = "flex w-full justify-between py-2 text-left text-sm font-medium text-neutral-800 focus:outline-none focus-visible:ring focus-visible:ring-pink-500 focus-visible:ring-opacity-75 dark:text-white" >
492+ < DisclosureButton className = "flex w-full justify-between py-2 text-left text-sm font-medium text-neutral-800 focus:outline-none focus-visible:ring focus-visible:ring-pink-500 focus-visible:ring-opacity-75 dark:text-white" >
488493 < span > More Options</ span >
489494 < ChevronUpIcon
490495 className = { `${
491496 open ? "" : "rotate-180 transform"
492497 } h-5 w-5 text-neutral-400`}
493498 />
494- </ Disclosure . Button >
495- < Disclosure . Panel className = "pb-2 pt-4" >
499+ </ DisclosureButton >
500+ < DisclosurePanel className = "pb-2 pt-4" >
496501 < label htmlFor = "canonicalUrl" >
497502 Canonical URL
498503 </ label >
@@ -529,7 +534,7 @@ const Create = ({ session }: { session: Session }) => {
529534 Share this link with others to preview your
530535 draft. Anyone with the link can view your draft.
531536 </ p >
532- </ Disclosure . Panel >
537+ </ DisclosurePanel >
533538 </ >
534539 ) }
535540 </ Disclosure >
@@ -581,7 +586,7 @@ const Create = ({ session }: { session: Session }) => {
581586 </ div >
582587 </ div >
583588 </ div >
584- </ Transition . Root >
589+ </ Transition >
585590 { dataStatus === "loading" && postId && (
586591 < div className = "bg-gray fixed left-0 top-0 z-40 flex h-screen w-screen items-center justify-center " >
587592 < div className = "z-50 flex flex-col items-center border-2 border-black bg-white px-5 py-2 opacity-100" >
0 commit comments