Skip to content

Commit 4a498fa

Browse files
committed
add dashboard
1 parent 6859bed commit 4a498fa

37 files changed

+5288
-187
lines changed

app/components/app-sidebar.tsx

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
import {
2+
IconCamera,
3+
IconChartBar,
4+
IconDashboard,
5+
IconDatabase,
6+
IconFileAi,
7+
IconFileDescription,
8+
IconFileWord,
9+
IconFolder,
10+
IconHelp,
11+
IconInnerShadowTop,
12+
IconListDetails,
13+
IconReport,
14+
IconSearch,
15+
IconSettings,
16+
IconUsers,
17+
} from "@tabler/icons-react"
18+
import type * as React from "react"
19+
import { href, Link } from "react-router"
20+
21+
import { NavDocuments } from "~/components/nav-documents"
22+
import { NavMain } from "~/components/nav-main"
23+
import { NavSecondary } from "~/components/nav-secondary"
24+
import { NavUser } from "~/components/nav-user"
25+
import {
26+
Sidebar,
27+
SidebarContent,
28+
SidebarFooter,
29+
SidebarHeader,
30+
SidebarMenu,
31+
SidebarMenuButton,
32+
SidebarMenuItem,
33+
} from "~/components/ui/sidebar"
34+
35+
const data = {
36+
user: {
37+
name: "shadcn",
38+
email: "m@example.com",
39+
avatar: "/avatars/shadcn.jpg",
40+
},
41+
navMain: [
42+
{
43+
title: "Dashboard",
44+
url: "#",
45+
icon: IconDashboard,
46+
},
47+
{
48+
title: "Lifecycle",
49+
url: "#",
50+
icon: IconListDetails,
51+
},
52+
{
53+
title: "Analytics",
54+
url: "#",
55+
icon: IconChartBar,
56+
},
57+
{
58+
title: "Projects",
59+
url: "#",
60+
icon: IconFolder,
61+
},
62+
{
63+
title: "Team",
64+
url: "#",
65+
icon: IconUsers,
66+
},
67+
],
68+
navClouds: [
69+
{
70+
title: "Capture",
71+
icon: IconCamera,
72+
isActive: true,
73+
url: "#",
74+
items: [
75+
{
76+
title: "Active Proposals",
77+
url: "#",
78+
},
79+
{
80+
title: "Archived",
81+
url: "#",
82+
},
83+
],
84+
},
85+
{
86+
title: "Proposal",
87+
icon: IconFileDescription,
88+
url: "#",
89+
items: [
90+
{
91+
title: "Active Proposals",
92+
url: "#",
93+
},
94+
{
95+
title: "Archived",
96+
url: "#",
97+
},
98+
],
99+
},
100+
{
101+
title: "Prompts",
102+
icon: IconFileAi,
103+
url: "#",
104+
items: [
105+
{
106+
title: "Active Proposals",
107+
url: "#",
108+
},
109+
{
110+
title: "Archived",
111+
url: "#",
112+
},
113+
],
114+
},
115+
],
116+
navSecondary: [
117+
{
118+
title: "Settings",
119+
url: "#",
120+
icon: IconSettings,
121+
},
122+
{
123+
title: "Get Help",
124+
url: "#",
125+
icon: IconHelp,
126+
},
127+
{
128+
title: "Search",
129+
url: "#",
130+
icon: IconSearch,
131+
},
132+
],
133+
documents: [
134+
{
135+
name: "Data Library",
136+
url: "#",
137+
icon: IconDatabase,
138+
},
139+
{
140+
name: "Reports",
141+
url: "#",
142+
icon: IconReport,
143+
},
144+
{
145+
name: "Word Assistant",
146+
url: "#",
147+
icon: IconFileWord,
148+
},
149+
],
150+
}
151+
152+
export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
153+
return (
154+
<Sidebar collapsible="offcanvas" {...props}>
155+
<SidebarHeader>
156+
<SidebarMenu>
157+
<SidebarMenuItem>
158+
<SidebarMenuButton asChild className="data-[slot=sidebar-menu-button]:!p-1.5">
159+
<Link to={href("/dashboard")}>
160+
<IconInnerShadowTop className="!size-5" />
161+
<span className="font-semibold text-base">Acme Inc.</span>
162+
</Link>
163+
</SidebarMenuButton>
164+
</SidebarMenuItem>
165+
</SidebarMenu>
166+
</SidebarHeader>
167+
<SidebarContent>
168+
<NavMain items={data.navMain} />
169+
<NavDocuments items={data.documents} />
170+
<NavSecondary items={data.navSecondary} className="mt-auto" />
171+
</SidebarContent>
172+
<SidebarFooter>
173+
<NavUser user={data.user} />
174+
</SidebarFooter>
175+
</Sidebar>
176+
)
177+
}

0 commit comments

Comments
 (0)