Removed SidebarContainer

Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
This commit is contained in:
Florian Bouillon 2021-03-30 16:57:57 +02:00
parent b35ab42cc5
commit 40ce098d63
3 changed files with 0 additions and 79 deletions

View File

@ -1,32 +0,0 @@
@import "../config.styl"
.sidebar
position fixed
width 200px
top 0
left 0
height 100%
background white
padding 16px
.content
padding-left 200px
.item
display flex
padding 8px 16px
margin-top 8px
transition $transition
border-radius 8px
svg
margin-right 8px
div
text-align center
flex-grow 1
margin-left -32px
&:hover
background $default
color white

View File

@ -1,45 +0,0 @@
import React, { FC } from 'react'
import { ChevronLeft, TrendingUp } from 'react-feather'
import Link from 'next/link'
import Image from '../Image'
import { IconProps } from '../interfaces'
import css from './SidebarContainer.module.styl'
interface Props {
domain: string
children: React.ReactNode
}
export default class SidebarContainer extends React.Component<Props> {
private menu: Array<{name: string, icon: FC<IconProps>, href: string, as?: string}> = [
{ name: 'back', icon: ChevronLeft, href: '/dashboard' },
{ name: 'Uptime', icon: TrendingUp, as: `/dashboard/${this.props.domain}/uptime`, href: '/dashboard/[domain]/uptime' }
]
public render = () => (
<>
<nav className={css.sidebar}>
<Link href="/dashboard">
<a>
<Image src="/assets/logo.svg" width={175} height={100} />
</a>
</Link>
{this.menu.map((item, index) => (
<Link key={index} href={item.href} as={item.as}>
<a className={css.item}>
<item.icon />
<div>{item.name}</div>
</a>
</Link>
))}
</nav>
<div className={css.content}>
{this.props.children}
</div>
</>
)
}

View File

@ -22,7 +22,6 @@ import Navbar from './dzeio/Navbar'
import Overflow from './dzeio/Overflow' import Overflow from './dzeio/Overflow'
import Popup from './dzeio/Popup' import Popup from './dzeio/Popup'
import Row from './dzeio/Row' import Row from './dzeio/Row'
import SidebarContainer from './dzeio/SidebarContainer'
import Table from './dzeio/Table' import Table from './dzeio/Table'
import Text from './dzeio/Text' import Text from './dzeio/Text'
import * as Util from './dzeio/Util' import * as Util from './dzeio/Util'
@ -46,7 +45,6 @@ export {
Overflow, Overflow,
Popup, Popup,
Row, Row,
SidebarContainer,
Table, Table,
Text, Text,
Util Util