Added side Pannel
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { usePannelStore } from "_store/pannelStore";
|
||||
|
||||
export const OpenButton = () => {
|
||||
const { setOpen } = usePannelStore();
|
||||
return (
|
||||
<button
|
||||
onClick={() => {
|
||||
setOpen(true);
|
||||
}}
|
||||
className="btn absolute inset-y-0 right-0 z-9999"
|
||||
>
|
||||
Open
|
||||
</button>
|
||||
);
|
||||
};
|
||||
16
apps/dispatch/app/(dispatch)/_components/pannel/Pannel.tsx
Normal file
16
apps/dispatch/app/(dispatch)/_components/pannel/Pannel.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
import { usePannelStore } from "_store/pannelStore";
|
||||
import { cn } from "helpers/cn";
|
||||
|
||||
export const Pannel = () => {
|
||||
const { isOpen, setOpen } = usePannelStore();
|
||||
return (
|
||||
<div className={cn("flex-1 max-w-[200px] z-9999999")}>
|
||||
<div className="bg-base-100 h-full w-full">
|
||||
<div className="flex justify-between items-center p-4">
|
||||
<h1 className="text-xl font-bold">Pannel</h1>
|
||||
<button onClick={() => setOpen(false)}>Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user