fix: make nav and sidebar styleguide compliant
fix: remove comments
This commit is contained in:
parent
a4532793f3
commit
e6e45ec509
3 changed files with 26 additions and 11 deletions
|
|
@ -3,6 +3,8 @@ import classnames from 'classnames'
|
||||||
import React, { memo, useState } from 'react'
|
import React, { memo, useState } from 'react'
|
||||||
import { NavLink } from 'react-router-dom'
|
import { NavLink } from 'react-router-dom'
|
||||||
|
|
||||||
|
import { ReactComponent as Logo } from 'src/styling/icons/menu/logo.svg'
|
||||||
|
|
||||||
import styles from './Header.styles'
|
import styles from './Header.styles'
|
||||||
import { Link } from './buttons'
|
import { Link } from './buttons'
|
||||||
import { H4 } from './typography'
|
import { H4 } from './typography'
|
||||||
|
|
@ -14,7 +16,6 @@ const renderSubheader = (item, classes) => {
|
||||||
return (
|
return (
|
||||||
<div className={classes.subheader}>
|
<div className={classes.subheader}>
|
||||||
<div className={classes.content}>
|
<div className={classes.content}>
|
||||||
<H4>{item.label}</H4>
|
|
||||||
<nav>
|
<nav>
|
||||||
<ul className={classes.subheaderUl}>
|
<ul className={classes.subheaderUl}>
|
||||||
{item.children.map((it, idx) => (
|
{item.children.map((it, idx) => (
|
||||||
|
|
@ -45,7 +46,10 @@ const Header = memo(({ tree }) => {
|
||||||
<header>
|
<header>
|
||||||
<div className={classes.header}>
|
<div className={classes.header}>
|
||||||
<div className={classes.content}>
|
<div className={classes.content}>
|
||||||
<H4 className={classes.white}>Lamassu Admin</H4>
|
<div className={classes.logo}>
|
||||||
|
<Logo />
|
||||||
|
<H4 className={classes.white}>Lamassu Admin</H4>
|
||||||
|
</div>
|
||||||
<nav className={classes.nav}>
|
<nav className={classes.nav}>
|
||||||
<ul className={classes.ul}>
|
<ul className={classes.ul}>
|
||||||
{tree.map((it, idx) => (
|
{tree.map((it, idx) => (
|
||||||
|
|
|
||||||
|
|
@ -41,14 +41,14 @@ export default {
|
||||||
ul: {
|
ul: {
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
marginBottom: spacer * 1,
|
marginBottom: spacer * 1,
|
||||||
paddingInlineStart: spacer * 4.5
|
paddingLeft: spacer * 4.5
|
||||||
},
|
},
|
||||||
li: {
|
li: {
|
||||||
extend: tl2,
|
extend: tl2,
|
||||||
height: spacer * 3,
|
height: spacer * 3,
|
||||||
listStyle: 'none',
|
listStyle: 'none',
|
||||||
color: white,
|
color: white,
|
||||||
padding: `0 ${spacer * 2.5}px`
|
padding: [[0, spacer * 2.5]]
|
||||||
},
|
},
|
||||||
link: {
|
link: {
|
||||||
extend: p,
|
extend: p,
|
||||||
|
|
@ -76,7 +76,7 @@ export default {
|
||||||
bottom: -8,
|
bottom: -8,
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
borderRadius: 1000,
|
borderRadius: 1000,
|
||||||
transition: 'all 0.2s cubic-bezier(0.95, 0.1, 0.45, 0.94)'
|
transition: [['all', '0.2s', 'cubic-bezier(0.95, 0.1, 0.45, 0.94)']]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
forceSize: {
|
forceSize: {
|
||||||
|
|
@ -110,7 +110,7 @@ export default {
|
||||||
},
|
},
|
||||||
subheaderUl: {
|
subheaderUl: {
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
paddingInlineStart: spacer * 4.5
|
paddingLeft: 0
|
||||||
},
|
},
|
||||||
subheaderLi: {
|
subheaderLi: {
|
||||||
extend: tl2,
|
extend: tl2,
|
||||||
|
|
@ -118,18 +118,29 @@ export default {
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
height: spacer * 3,
|
height: spacer * 3,
|
||||||
listStyle: 'none',
|
listStyle: 'none',
|
||||||
padding: `0 ${spacer * 2.5}px`
|
padding: [[0, spacer * 2.5]],
|
||||||
|
'&:first-child': {
|
||||||
|
paddingLeft: 0
|
||||||
|
}
|
||||||
},
|
},
|
||||||
subheaderLink: {
|
subheaderLink: {
|
||||||
extend: tl2,
|
extend: p,
|
||||||
textDecoration: 'none',
|
textDecoration: 'none',
|
||||||
border: 'none',
|
border: 'none',
|
||||||
color: placeholderColor
|
color: placeholderColor
|
||||||
},
|
},
|
||||||
activeSubheaderLink: {
|
activeSubheaderLink: {
|
||||||
|
extend: tl2,
|
||||||
color: fontColor
|
color: fontColor
|
||||||
},
|
},
|
||||||
white: {
|
white: {
|
||||||
color: white
|
color: white
|
||||||
|
},
|
||||||
|
logo: {
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
'& > svg': {
|
||||||
|
marginRight: 16
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import {
|
||||||
|
|
||||||
import typographyStyles from './typography/styles'
|
import typographyStyles from './typography/styles'
|
||||||
|
|
||||||
const { tl2 } = typographyStyles
|
const { tl2, p } = typographyStyles
|
||||||
|
|
||||||
const sidebarColor = zircon
|
const sidebarColor = zircon
|
||||||
|
|
||||||
|
|
@ -33,7 +33,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
link: {
|
link: {
|
||||||
extend: tl2,
|
extend: p,
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
color: placeholderColor,
|
color: placeholderColor,
|
||||||
margin: '12px 24px 12px 0',
|
margin: '12px 24px 12px 0',
|
||||||
|
|
@ -56,8 +56,8 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
activeLink: {
|
activeLink: {
|
||||||
|
extend: tl2,
|
||||||
color: primaryColor,
|
color: primaryColor,
|
||||||
fontWeight: 700,
|
|
||||||
'&::after': {
|
'&::after': {
|
||||||
height: '140%'
|
height: '140%'
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue