Skip to content

Commit

Permalink
Rename TooltipTab to TabButton.
Browse files Browse the repository at this point in the history
  • Loading branch information
junhaoliao committed Sep 29, 2024
1 parent 6f4613e commit 7146619
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import {
TAB_NAME,
} from "../../../../typings/tab";

import "./TooltipTab.css";
import "./TabButton.css";


interface TooltipTabProps {
interface TabButtonProps {
tabName: TAB_NAME,
Icon: SvgIconComponent,
onTabButtonClick: (tabName: TAB_NAME) => void
Expand All @@ -28,7 +28,7 @@ interface TooltipTabProps {
* @param props.onTabButtonClick
* @return
*/
const TooltipTab = ({tabName, Icon, onTabButtonClick}: TooltipTabProps) => {
const TabButton = ({tabName, Icon, onTabButtonClick}: TabButtonProps) => {
const handleClick = () => {
onTabButtonClick(tabName);
};
Expand All @@ -54,4 +54,4 @@ const TooltipTab = ({tabName, Icon, onTabButtonClick}: TooltipTabProps) => {
);
};

export default TooltipTab;
export default TabButton;
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import SettingsOutlinedIcon from "@mui/icons-material/SettingsOutlined";
import {TAB_NAME} from "../../../../typings/tab";
import SettingsModal from "../../../modals/SettingsModal";
import FileInfoTabPanel from "./FileInfoTabPanel";
import TooltipTab from "./TooltipTab";
import TabButton from "./TabButton";

import "./index.css";

Expand Down Expand Up @@ -77,7 +77,7 @@ const SidebarTabs = forwardRef<HTMLDivElement, SidebarTabsProps>((
size={"lg"}
>
{TABS_INFO_LIST.map(({tabName, Icon}) => (
<TooltipTab
<TabButton
Icon={Icon}
key={tabName}
tabName={tabName}
Expand All @@ -87,7 +87,7 @@ const SidebarTabs = forwardRef<HTMLDivElement, SidebarTabsProps>((
{/* Forces the settings tab to bottom of sidebar. */}
<div className={"sidebar-tab-list-spacing"}/>

<TooltipTab
<TabButton
Icon={SettingsOutlinedIcon}
tabName={TAB_NAME.SETTINGS}
onTabButtonClick={handleTabButtonClick}/>
Expand Down

0 comments on commit 7146619

Please sign in to comment.