-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
275 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import type { Metadata } from "next"; | ||
import { Sidebar } from "@/components/sidebar"; | ||
import { Container } from "@/components/container"; | ||
|
||
export const metadata: Metadata = { | ||
title: "Glui Docs", | ||
description: "Componenet library built on top of Tailwind CSS and React.", | ||
}; | ||
|
||
export default function SinkLayout({ | ||
children, | ||
}: Readonly<{ | ||
children: React.ReactNode; | ||
}>) { | ||
return ( | ||
<main className="w-full max-w-screen-2xl"> | ||
<div className="relative pt-16 h-full flex flex-row gap-4"> | ||
<Sidebar /> | ||
<Container> | ||
{children} | ||
</Container> | ||
</div> | ||
</main> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import { Container } from "@/components/container"; | ||
import { GluonDemo } from "@/components/gluon-demo"; | ||
import { Resizable } from "@/components/resizable"; | ||
import { Sidebar } from "@/components/sidebar"; | ||
import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "@/components/ui/resizable"; | ||
import CarouselDemo from "@/gluons/demo/carousel-demo"; | ||
import ContentAccordionDemo from "@/gluons/demo/content-accordion-demo"; | ||
import HeaderDemo from "@/gluons/demo/header-demo"; | ||
import SidebarDemo from "@/gluons/demo/sidebar-demo"; | ||
import { GripVertical } from "lucide-react"; | ||
|
||
const SinkPage = () => { | ||
return ( | ||
<div> | ||
<h1 className="text-4xl font-semibold"> | ||
Sink | ||
</h1> | ||
<div className="py-8"> | ||
<h3 className="text-2xl font-semibold pb-4"> | ||
Content Accordion | ||
</h3> | ||
<Resizable> | ||
<ContentAccordionDemo /> | ||
</Resizable> | ||
</div> | ||
<div className="py-8"> | ||
<h3 className="text-2xl font-semibold pb-4"> | ||
Carousel | ||
</h3> | ||
<Resizable> | ||
<CarouselDemo /> | ||
</Resizable> | ||
</div> | ||
<div className="py-8"> | ||
<h3 className="text-2xl font-semibold pb-4"> | ||
Header | ||
</h3> | ||
<Resizable> | ||
<HeaderDemo /> | ||
</Resizable> | ||
</div> | ||
<div className="py-8"> | ||
<h3 className="text-2xl font-semibold pb-4"> | ||
Sidebar | ||
</h3> | ||
<Resizable> | ||
<SidebarDemo /> | ||
</Resizable> | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export default SinkPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { cn } from "@/lib/utils" | ||
|
||
export const DemoPreviewContainer = ({ | ||
devicePreview, | ||
children, | ||
className, | ||
}: { | ||
devicePreview: "desktop" | "tablet" | "smartphone", | ||
className?: string, | ||
children: React.ReactNode, | ||
}) => { | ||
return ( | ||
<div className={cn( | ||
"@container grow border rounded-md bg-background max-h-full overflow-auto", | ||
devicePreview === "desktop" && "w-full", | ||
devicePreview === "tablet" && "max-w-lg", | ||
devicePreview === "smartphone" && "max-w-sm", | ||
)}> | ||
{children} | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "@/components/ui/resizable"; | ||
|
||
export const Resizable = ({ | ||
children, | ||
}: { | ||
children: React.ReactNode, | ||
}) => { | ||
return ( | ||
<ResizablePanelGroup | ||
direction="horizontal" | ||
className="w-full" | ||
> | ||
<ResizablePanel defaultSize={100} className="min-w-96"> | ||
<div className="h-[500px] flex flex-col justify-center overflow-auto border border-foreground bg-[url('/dot-grid.svg')] bg-center"> | ||
{children} | ||
</div> | ||
</ResizablePanel> | ||
<ResizableHandle className="w-1.5 h-8 ml-1.5 my-auto bg-muted-foreground rounded-full" /> | ||
<ResizablePanel className="w-[1px] min-w-[1px]"> | ||
<div /> | ||
</ResizablePanel> | ||
</ResizablePanelGroup> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.