mirror of
https://github.com/rustfs/console.git
synced 2026-11-03 23:05:19 +08:00
* chore: replace codebase with Next.js version (console-new) - Migrate from Nuxt/Vue to Next.js/React - Same repo, dev-pr branch has shared history with main for PR * chore: wip * ci: pin pnpm to latest in workflows, packageManager 10.19.0 * ci: use pnpm version from package.json only (fix version mismatch) * fix: CI - add root page redirect, fix TS types and lint (api-client, aws4fetch, upload-task, hooks) * fix(ci): add type-check script for TypeScript Check job * fix(ci): resolve Code Formatting job - ESLint errors (setState-in-effect, refs, static-components, preserve-memoization) * fix(ci): add lint:fix script for quality workflow Auto-fix step * fix(ci): add SVG module type declaration for TypeScript Check
48 lines
1.3 KiB
TypeScript
48 lines
1.3 KiB
TypeScript
"use client"
|
|
|
|
import {
|
|
RiHomeLine,
|
|
RiBox3Line,
|
|
RiDoorLockLine,
|
|
RiShieldCheckLine,
|
|
RiFileUserLine,
|
|
RiGroupLine,
|
|
RiDownload2Line,
|
|
RiBarChartBoxLine,
|
|
RiStackLine,
|
|
RiBookmark3Line,
|
|
RiSecurePaymentLine,
|
|
RiCopyrightLine,
|
|
RiFileList3Line,
|
|
RiBroadcastLine,
|
|
RiFileCopyLine,
|
|
RiExchange2Line,
|
|
RiUploadCloud2Line,
|
|
} from "@remixicon/react"
|
|
import type { ComponentType } from "react"
|
|
|
|
const iconMap: Record<string, ComponentType<{ className?: string }>> = {
|
|
"ri:home-line": RiHomeLine,
|
|
"ri:box-3-line": RiBox3Line,
|
|
"ri:door-lock-line": RiDoorLockLine,
|
|
"ri:shield-check-line": RiShieldCheckLine,
|
|
"ri:file-user-line": RiFileUserLine,
|
|
"ri:group-line": RiGroupLine,
|
|
"ri:download-2-line": RiDownload2Line,
|
|
"ri:bar-chart-box-line": RiBarChartBoxLine,
|
|
"ri:stack-line": RiStackLine,
|
|
"ri:bookmark-3-line": RiBookmark3Line,
|
|
"ri:secure-payment-line": RiSecurePaymentLine,
|
|
"ri:copyright-line": RiCopyrightLine,
|
|
"ri:file-list-3-line": RiFileList3Line,
|
|
"ri:broadcast-line": RiBroadcastLine,
|
|
"ri:file-copy-line": RiFileCopyLine,
|
|
"ri:exchange-2-line": RiExchange2Line,
|
|
"ri:upload-cloud-2-line": RiUploadCloud2Line,
|
|
}
|
|
|
|
export function getIconComponent(name?: string): ComponentType<{ className?: string }> | null {
|
|
if (!name) return null
|
|
return iconMap[name] ?? null
|
|
}
|