From fd40ce5e7541e69cef605a5e1c5b3bf4b9311386 Mon Sep 17 00:00:00 2001 From: artwork21c Date: Wed, 31 Dec 2025 13:18:30 +0900 Subject: [PATCH] =?UTF-8?q?coreui=20=EC=86=8C=EC=8A=A4=EB=A5=BC=20ts=20?= =?UTF-8?q?=EB=A1=9C=20=EC=A0=84=ED=99=98=20:=20=EC=B6=94=EA=B0=80?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AppFooter.tsx | 18 +++++++++++++++- src/components/AppSidebarNav.tsx | 37 +++++++++++++++++++++++++------- src/styles.d.ts | 5 +++++ 3 files changed, 51 insertions(+), 9 deletions(-) diff --git a/src/components/AppFooter.tsx b/src/components/AppFooter.tsx index 217c5a0..24c8eff 100644 --- a/src/components/AppFooter.tsx +++ b/src/components/AppFooter.tsx @@ -10,10 +10,26 @@ const AppFooter = () => { © 2025 creativeLabs. + +
+ Referrence : + + Demo + + | + + Docs + + | + + Git + +
+
Powered by - CoreUI React Admin & Dashboard Template + CoreUI React
diff --git a/src/components/AppSidebarNav.tsx b/src/components/AppSidebarNav.tsx index 7583abf..01b347a 100644 --- a/src/components/AppSidebarNav.tsx +++ b/src/components/AppSidebarNav.tsx @@ -7,17 +7,38 @@ import 'simplebar-react/dist/simplebar.min.css' import { CBadge, CNavLink, CSidebarNav } from '@coreui/react' -export const AppSidebarNav = ({ items }) => { - const navLink = (name, icon, badge, indent = false) => { +interface Badge { + color: string + text: string +} + +interface NavItem { + component: React.ElementType + name?: string + icon?: React.ReactNode + badge?: Badge + indent?: boolean + to?: string + href?: string + items?: NavItem[] + [key: string]: any +} + +interface AppSidebarNavProps { + items: NavItem[] +} + +export const AppSidebarNav = ({ items }: AppSidebarNavProps) => { + const navLink = (name?: string, icon?: React.ReactNode, badge?: Badge, indent = false) => { return ( <> {icon ? icon : indent && ( - - - - )} + + + + )} {name && name} {badge && ( @@ -28,7 +49,7 @@ export const AppSidebarNav = ({ items }) => { ) } - const navItem = (item, index, indent = false) => { + const navItem = (item: NavItem, index: number, indent = false) => { const { component, name, badge, icon, ...rest } = item const Component = component return ( @@ -48,7 +69,7 @@ export const AppSidebarNav = ({ items }) => { ) } - const navGroup = (item, index) => { + const navGroup = (item: NavItem, index: number) => { const { component, name, icon, items, to, ...rest } = item const Component = component return ( diff --git a/src/styles.d.ts b/src/styles.d.ts index 7cbc819..341e2cf 100644 --- a/src/styles.d.ts +++ b/src/styles.d.ts @@ -1,4 +1,9 @@ declare module '*.scss' { const content: { [className: string]: string }; export default content; +} + +declare module '*.css' { + const content: { [className: string]: string }; + export default content; } \ No newline at end of file