UNPKG

orcs-design-system

Version:
64 lines 1.45 kB
import React from "react"; import TabsAlt from "."; import { BrowserRouter, Route, Switch } from "react-router-dom"; import Box from "../Box"; import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; export default { title: "Components/TabsAlt", decorators: [storyFn => /*#__PURE__*/_jsx(Box, { boxBorder: "default", shadow: "default", pb: "200px", children: storyFn() })], component: TabsAlt }; const tabsList = [{ label: "Details", path: "/details" }, { label: "Strategy", path: "/strategy" }, { label: "Associations", path: "/associations" }, { label: "Visualisation", path: "/visualisation" }, { label: "Principles", path: "/principles" }, { label: "Planner", path: "/planner" }, { label: "Forecast", path: "/forecast" }, { label: "Team Builder", path: "/teambuilder" }, { label: "History", path: "/history", isVisible: false }]; export const defaultTabs = () => /*#__PURE__*/_jsxs(BrowserRouter, { children: [/*#__PURE__*/_jsx(TabsAlt, { tabsList: tabsList }), /*#__PURE__*/_jsx(Switch, { children: tabsList.map(tab => /*#__PURE__*/_jsx(Route, { path: tab.path, children: /*#__PURE__*/_jsxs(Box, { p: "l", mt: "l", children: ["ROUTE RENDERED: ", tab.label] }) }, tab.path)) })] }); defaultTabs.storyName = "Default"; defaultTabs.__docgenInfo = { "description": "", "methods": [], "displayName": "defaultTabs" };