coreui 소스를 ts 로 전환 : 추가수정
This commit is contained in:
@@ -10,10 +10,26 @@ const AppFooter = () => {
|
||||
</a>
|
||||
<span className="ms-1">© 2025 creativeLabs.</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span className="m-2">Referrence :</span>
|
||||
<a href="https://coreui.io/demos/react/5.5/free/?theme=light#/dashboard" target="_blank" rel="noopener noreferrer">
|
||||
Demo
|
||||
</a>
|
||||
<span className="m-2">|</span>
|
||||
<a href="https://coreui.io/react/docs/templates/installation/" target="_blank" rel="noopener noreferrer">
|
||||
Docs
|
||||
</a>
|
||||
<span className="m-2">|</span>
|
||||
<a href="https://github.com/coreui/coreui-free-react-admin-template" target="_blank" rel="noopener noreferrer">
|
||||
Git
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div className="ms-auto">
|
||||
<span className="me-1">Powered by</span>
|
||||
<a href="https://coreui.io/react" target="_blank" rel="noopener noreferrer">
|
||||
CoreUI React Admin & Dashboard Template
|
||||
CoreUI React
|
||||
</a>
|
||||
</div>
|
||||
</CFooter>
|
||||
|
||||
@@ -7,8 +7,29 @@ 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
|
||||
@@ -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 (
|
||||
|
||||
5
src/styles.d.ts
vendored
5
src/styles.d.ts
vendored
@@ -2,3 +2,8 @@ declare module '*.scss' {
|
||||
const content: { [className: string]: string };
|
||||
export default content;
|
||||
}
|
||||
|
||||
declare module '*.css' {
|
||||
const content: { [className: string]: string };
|
||||
export default content;
|
||||
}
|
||||
Reference in New Issue
Block a user