From 51feb4e2040ca657553745e377b3b1d952076852 Mon Sep 17 00:00:00 2001 From: Web Spinner Bot Date: Sun, 17 Dec 2023 01:21:13 +0000 Subject: [PATCH] Create page: Home --- src/app/dashboard/page.tsx | 33 +++++++++++++++++++++++++++++++ src/components/Avatar.tsx | 18 +++++++++++++++++ src/components/Content.tsx | 17 ++++++++++++++++ src/components/PageLink.tsx | 20 +++++++++++++++++++ src/components/Sidebar.tsx | 17 ++++++++++++++++ src/components/SidebarHeading.tsx | 17 ++++++++++++++++ src/components/SidebarItem.tsx | 17 ++++++++++++++++ 7 files changed, 139 insertions(+) create mode 100644 src/app/dashboard/page.tsx create mode 100644 src/components/Avatar.tsx create mode 100644 src/components/Content.tsx create mode 100644 src/components/PageLink.tsx create mode 100644 src/components/Sidebar.tsx create mode 100644 src/components/SidebarHeading.tsx create mode 100644 src/components/SidebarItem.tsx diff --git a/src/app/dashboard/page.tsx b/src/app/dashboard/page.tsx new file mode 100644 index 0000000..79a4625 --- /dev/null +++ b/src/app/dashboard/page.tsx @@ -0,0 +1,33 @@ +"use client" + +import React from 'react'; +import Sidebar from '@/components/Sidebar'; +import SidebarItem from '@/components/SidebarItem'; +import SidebarHeading from '@/components/SidebarHeading'; +import Content from '@/components/Content'; +import PageLink from '@/components/PageLink'; +import Avatar from '@/components/Avatar'; + +function DashboardPage() { + return ( +
+ + +
Gram Liu
+ + Profile + Settings +
+ +

Welcome

+

to your private space on the web

+

Your pages

+ + + +
+
+ ); +} + +export default DashboardPage; diff --git a/src/components/Avatar.tsx b/src/components/Avatar.tsx new file mode 100644 index 0000000..4ade9b4 --- /dev/null +++ b/src/components/Avatar.tsx @@ -0,0 +1,18 @@ +"use client" + +import React from 'react'; +import { Avatar as BaseAvatar, AvatarFallback } from '@/components/ui/avatar'; + +interface AvatarProps { + initials?: string; +} + +function Avatar({ initials }: AvatarProps) { + return ( + + {initials} + + ); +} + +export default Avatar; diff --git a/src/components/Content.tsx b/src/components/Content.tsx new file mode 100644 index 0000000..43bf987 --- /dev/null +++ b/src/components/Content.tsx @@ -0,0 +1,17 @@ +"use client" + +import React from 'react'; + +interface ContentProps { + children: React.ReactNode; +} + +function Content({ children }: ContentProps) { + return ( +
+ {children} +
+ ); +} + +export default Content; diff --git a/src/components/PageLink.tsx b/src/components/PageLink.tsx new file mode 100644 index 0000000..aa36e84 --- /dev/null +++ b/src/components/PageLink.tsx @@ -0,0 +1,20 @@ +"use client" + +import React from 'react'; + +interface PageLinkProps { + icon: string; + label: string; + colorClassName: string; +} + +function PageLink({ icon, label, colorClassName }: PageLinkProps) { + return ( +
+ {icon} + {label} +
+ ); +} + +export default PageLink; diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx new file mode 100644 index 0000000..e0e96b8 --- /dev/null +++ b/src/components/Sidebar.tsx @@ -0,0 +1,17 @@ +"use client" + +import React from 'react'; + +interface SidebarProps { + children: React.ReactNode; +} + +function Sidebar({ children }: SidebarProps) { + return ( +
+ {children} +
+ ); +} + +export default Sidebar; diff --git a/src/components/SidebarHeading.tsx b/src/components/SidebarHeading.tsx new file mode 100644 index 0000000..52e8aaf --- /dev/null +++ b/src/components/SidebarHeading.tsx @@ -0,0 +1,17 @@ +"use client" + +import React from 'react'; + +interface SidebarHeadingProps { + text: string; +} + +function SidebarHeading({ text }: SidebarHeadingProps) { + return ( +
+ {text} +
+ ); +} + +export default SidebarHeading; diff --git a/src/components/SidebarItem.tsx b/src/components/SidebarItem.tsx new file mode 100644 index 0000000..028ea21 --- /dev/null +++ b/src/components/SidebarItem.tsx @@ -0,0 +1,17 @@ +"use client" + +import React from 'react'; + +interface SidebarItemProps { + children: React.ReactNode; +} + +function SidebarItem({ children }: SidebarItemProps) { + return ( +
+ {children} +
+ ); +} + +export default SidebarItem;