Portfolio/front/Tabs/TabRouter.ts
2025-03-12 08:17:34 +01:00

21 lines
503 B
TypeScript

import About from "./About";
import Contact from "./Contact";
import Projects from "./Projects";
interface TabRouterProps {
width: number;
height: number;
selectedTab: "About" | "Projects" | "Contact";
}
const TabRouter = ({ width, height, selectedTab }: TabRouterProps) => {
switch (selectedTab) {
case "About":
return About({ width, height });
case "Projects":
return Projects({ width, height });
case "Contact":
return Contact({ width, height });
}
};
export default TabRouter;