22 lines
503 B
TypeScript
22 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;
|