-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLayout.jsx
More file actions
59 lines (55 loc) · 1.59 KB
/
Layout.jsx
File metadata and controls
59 lines (55 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import React from 'react'
import { useRouter } from 'next/router'
import {
Layout as RMDLayout,
Configuration,
useLayoutNavigation,
ArrowDropDownSVGIcon,
CheckBoxSVGIcon,
FileDownloadSVGIcon,
KeyboardArrowDownSVGIcon,
KeyboardArrowLeftSVGIcon,
KeyboardArrowRightSVGIcon,
MenuSVGIcon,
NotificationsSVGIcon,
RadioButtonCheckedSVGIcon,
RemoveRedEyeSVGIcon,
ArrowUpwardSVGIcon,
CheckSVGIcon,
} from 'react-md'
import LinkUnstyled from '../LinkUnstyled'
import navItems from './navItems'
const icons = {
back: <KeyboardArrowLeftSVGIcon />,
checkbox: <CheckBoxSVGIcon />,
dropdown: <ArrowDropDownSVGIcon />,
download: <FileDownloadSVGIcon />,
expander: <KeyboardArrowDownSVGIcon />,
forward: <KeyboardArrowRightSVGIcon />,
menu: <MenuSVGIcon />,
notification: <NotificationsSVGIcon />,
radio: <RadioButtonCheckedSVGIcon />,
password: <RemoveRedEyeSVGIcon />,
selected: <CheckSVGIcon />,
sort: <ArrowUpwardSVGIcon />,
}
// Check out the documentation for Configuring your Layout for more information:
// - https://react-md.dev/guides/configuring-your-layout
export default function Layout({ children }) {
const { pathname } = useRouter()
return (
<Configuration icons={icons}>
<RMDLayout
title="Main Title"
navHeaderTitle="Navigation Header Title"
tabletLayout="temporary"
landscapeTabletLayout="temporary"
desktopLayout="temporary"
largeDesktopLayout="temporary"
treeProps={useLayoutNavigation(navItems, pathname, LinkUnstyled)}
>
{children}
</RMDLayout>
</Configuration>
)
}