-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MWB-888: add tabs for elements definition
- Loading branch information
1 parent
00baf79
commit a239994
Showing
5 changed files
with
95 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 4 additions & 35 deletions
39
mapping_workbench/frontend/src/pages/app/fields-and-nodes/tree-view/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
mapping_workbench/frontend/src/sections/app/elements-definition/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import Tab from '@mui/material/Tab'; | ||
import Tabs from '@mui/material/Tabs'; | ||
import {useRouter} from 'next/router'; | ||
import {paths} from '../../../paths'; | ||
|
||
const TABS = [ | ||
{ | ||
label: 'Define', | ||
value: paths.app.fields_and_nodes.develop.index | ||
}, | ||
{ | ||
label: 'Tree View', | ||
value: paths.app.fields_and_nodes.tree_view.index | ||
}, | ||
{ | ||
label: 'Overview', | ||
value: paths.app.fields_and_nodes.overview.index | ||
}] | ||
|
||
export const ElementsDefinitionTabs = () => { | ||
const router = useRouter() | ||
const handleTabsChange = (event, value) => router.push(value) | ||
|
||
return <Tabs value={router.pathname} | ||
onChange={handleTabsChange}> | ||
{TABS.map(tab => <Tab key={tab.value} | ||
label={tab.label} | ||
value={tab.value}/>)} | ||
</Tabs> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters