From a1f69d978426c6a4cb7e8f3116e087553dbbffd5 Mon Sep 17 00:00:00 2001 From: crupest Date: Thu, 31 Aug 2023 19:18:48 +0800 Subject: ... --- FrontEnd/src/components/tab/Tabs.tsx | 62 ------------------------------------ 1 file changed, 62 deletions(-) delete mode 100644 FrontEnd/src/components/tab/Tabs.tsx (limited to 'FrontEnd/src/components/tab/Tabs.tsx') diff --git a/FrontEnd/src/components/tab/Tabs.tsx b/FrontEnd/src/components/tab/Tabs.tsx deleted file mode 100644 index dc8d9c01..00000000 --- a/FrontEnd/src/components/tab/Tabs.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import * as React from "react"; -import { Link } from "react-router-dom"; -import { useTranslation } from "react-i18next"; -import classnames from "classnames"; - -import { convertI18nText, I18nText } from "~src/common"; - -import "./Tabs.css"; - -export interface Tab { - name: string; - text: I18nText; - link?: string; - onClick?: () => void; -} - -export interface TabsProps { - activeTabName?: string; - actions?: React.ReactNode; - dense?: boolean; - tabs: Tab[]; - className?: string; - style?: React.CSSProperties; -} - -export default function Tabs(props: TabsProps): React.ReactElement | null { - const { tabs, activeTabName, className, style, dense, actions } = props; - - const { t } = useTranslation(); - - return ( -
- {tabs.map((tab) => { - const active = activeTabName === tab.name; - const className = classnames("cru-nav-item", active && "active"); - - if (tab.link != null) { - return ( - - {convertI18nText(tab.text, t)} - - ); - } else { - return ( - - {convertI18nText(tab.text, t)} - - ); - } - })} -
{actions}
-
- ); -} -- cgit v1.2.3