mirror of
https://github.com/dzeiocom/components.git
synced 2025-04-22 19:02:15 +00:00
Removed SidebarContainer
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
This commit is contained in:
parent
b35ab42cc5
commit
40ce098d63
@ -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
|
|
@ -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>
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
|
|
||||||
}
|
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user