el.xwx.moe/components/Modals/New.tsx

72 lines
2.2 KiB
TypeScript
Raw Normal View History

2023-11-28 04:39:45 -06:00
import { Tab } from "@headlessui/react";
2023-11-28 13:24:52 -06:00
import React from "react";
import { Toaster } from "react-hot-toast";
import NewLink from "./Tabs.tsx/NewLink";
import NewCollection from "./Tabs.tsx/NewCollection";
2023-11-28 04:39:45 -06:00
export default function New() {
return (
2023-11-28 13:24:52 -06:00
<dialog id="new-modal" className="modal backdrop-blur-sm overflow-y-auto">
<Toaster
position="top-center"
reverseOrder={false}
toastOptions={{
className:
"border border-sky-100 dark:border-neutral-700 dark:bg-neutral-900 dark:text-white",
}}
/>
<div className="modal-box max-h-full overflow-y-visible border border-neutral-content w-11/12 max-w-2xl">
2023-11-28 04:39:45 -06:00
<form method="dialog">
2023-11-28 13:24:52 -06:00
<button className="btn btn-sm outline-none btn-circle btn-ghost absolute right-5 top-5">
2023-11-28 04:39:45 -06:00
</button>
</form>
<Tab.Group>
<Tab.List className="tabs-boxed flex w-fit mr-auto justify-center gap-1 p-1">
<Tab
className={({ selected }) =>
`${
selected ? "btn-primary" : "btn-ghost"
2023-11-28 13:24:52 -06:00
} outline-none rounded-md btn btn-sm w-24`
2023-11-28 04:39:45 -06:00
}
>
Link
</Tab>
{/* <Tab
className={({ selected }) =>
`${
selected ? "btn-primary" : "btn-ghost"
2023-11-28 13:24:52 -06:00
} outline-none rounded-md btn btn-sm w-24`
2023-11-28 04:39:45 -06:00
}
>
File
</Tab> */}
<Tab
className={({ selected }) =>
`${
selected ? "btn-primary" : "btn-ghost"
2023-11-28 13:24:52 -06:00
} outline-none rounded-md btn btn-sm w-24`
2023-11-28 04:39:45 -06:00
}
>
Collection
</Tab>
</Tab.List>
<Tab.Panels className="mt-5">
<Tab.Panel>
2023-11-28 13:24:52 -06:00
<NewLink />
2023-11-28 04:39:45 -06:00
</Tab.Panel>
{/* <Tab.Panel>Content 2</Tab.Panel> */}
2023-11-28 13:24:52 -06:00
<Tab.Panel>
<NewCollection />
</Tab.Panel>
2023-11-28 04:39:45 -06:00
</Tab.Panels>
</Tab.Group>
</div>
<form method="dialog" className="modal-backdrop">
<button>close</button>
</form>
</dialog>
);
}