Update buttons and header menu styles
This commit is contained in:
parent
8df60c0e1d
commit
e605e96fee
6 changed files with 56 additions and 53 deletions
|
|
@ -1,35 +1,32 @@
|
||||||
.Button {
|
.Button {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
background: transparent;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
|
color: $grey-50;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
font-size: 1.4rem;
|
font-size: $font-button;
|
||||||
font-weight: $medium;
|
font-weight: $normal;
|
||||||
gap: 6px;
|
gap: 6px;
|
||||||
padding: 8px 12px;
|
padding: 8px 12px;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: $grey-00;
|
background: white;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
color: $grey-00;
|
||||||
|
|
||||||
& .icon {
|
.icon svg {
|
||||||
color: #2360C5;
|
fill: $grey-50;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.btn-grey {
|
.icon {
|
||||||
background: white;
|
margin-top: 2px;
|
||||||
|
|
||||||
&:hover {
|
svg {
|
||||||
background: $grey-90;
|
fill: $grey-50;
|
||||||
|
height: 12px;
|
||||||
.text {
|
width: 12px;
|
||||||
color: $grey-00;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.text {
|
|
||||||
color: $grey-10;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -70,17 +67,8 @@
|
||||||
color: #bababa;
|
color: #bababa;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon {
|
|
||||||
height: 12px;
|
|
||||||
width: 12px;
|
|
||||||
|
|
||||||
svg {
|
|
||||||
fill: #c9c9c9;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import classNames from 'classnames'
|
import classNames from 'classnames'
|
||||||
|
|
||||||
|
import AddIcon from '~public/icons/Add.svg'
|
||||||
|
import MenuIcon from '~public/icons/Menu.svg'
|
||||||
|
|
||||||
import './index.scss'
|
import './index.scss'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|
@ -33,15 +36,15 @@ class Button extends React.Component<Props, State> {
|
||||||
let icon
|
let icon
|
||||||
if (this.props.type === 'new') {
|
if (this.props.type === 'new') {
|
||||||
icon = <span className='icon'>
|
icon = <span className='icon'>
|
||||||
<img alt="" src="/icons/new.svg" />
|
<AddIcon />
|
||||||
</span>
|
</span>
|
||||||
} else if (this.props.type === 'menu') {
|
} else if (this.props.type === 'menu') {
|
||||||
icon = <span className='icon'>
|
icon = <span className='icon'>
|
||||||
<img alt="" src="/icons/menu.svg" />
|
<MenuIcon />
|
||||||
</span>
|
</span>
|
||||||
} else if (this.props.type === 'link') {
|
} else if (this.props.type === 'link') {
|
||||||
icon = <span className='icon'>
|
icon = <span className='icon'>
|
||||||
<img alt="" src="/icons/link.svg" />
|
<img alt="" src="/icons/Link.svg" />
|
||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,12 +16,8 @@
|
||||||
padding-right: 50px;
|
padding-right: 50px;
|
||||||
padding-bottom: 16px;
|
padding-bottom: 16px;
|
||||||
|
|
||||||
.Button .icon {
|
.Button {
|
||||||
color: #2360C5;
|
background: white;
|
||||||
}
|
|
||||||
|
|
||||||
.Button .text {
|
|
||||||
color: #555;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.Menu {
|
.Menu {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
background: white;
|
background: white;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
display: none;
|
display: none;
|
||||||
min-width: 140px;
|
min-width: 220px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: $unit * 5; // This shouldn't be hardcoded. How to calculate it?
|
top: $unit * 5; // This shouldn't be hardcoded. How to calculate it?
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
|
@ -10,21 +10,21 @@
|
||||||
|
|
||||||
.MenuItem {
|
.MenuItem {
|
||||||
color: $grey-10;
|
color: $grey-10;
|
||||||
font-weight: $medium;
|
font-weight: $normal;
|
||||||
padding: 10px;
|
padding: 12px;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: $grey-90;
|
background: $grey-100;
|
||||||
color: $grey-00;
|
color: $grey-00;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: $grey-00;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: $grey-10;
|
color: $grey-10;
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: $grey-00;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,19 @@ const HeaderMenu = (props: Props) => {
|
||||||
<ul className="Menu auth">
|
<ul className="Menu auth">
|
||||||
<div className="MenuGroup">
|
<div className="MenuGroup">
|
||||||
<li className="MenuItem">
|
<li className="MenuItem">
|
||||||
<Link href={`/${props.username}` || ''}>My Parties</Link>
|
<Link href={`/${props.username}` || ''}>{props.username}</Link>
|
||||||
|
</li>
|
||||||
|
<li className="MenuItem">
|
||||||
|
<Link href={`/${props.username}/saved` || ''}>Saved</Link>
|
||||||
|
</li>
|
||||||
|
</div>
|
||||||
|
<div className="MenuGroup">
|
||||||
|
<li className="MenuItem">
|
||||||
|
<Link href='/teans'>Teams</Link>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li className="MenuItem">
|
||||||
|
<Link href='/guides'>Guides</Link>
|
||||||
</li>
|
</li>
|
||||||
</div>
|
</div>
|
||||||
<div className="MenuGroup">
|
<div className="MenuGroup">
|
||||||
|
|
@ -38,12 +50,7 @@ const HeaderMenu = (props: Props) => {
|
||||||
{aboutOpen ? (
|
{aboutOpen ? (
|
||||||
<AboutModal close={closeAboutModal} />
|
<AboutModal close={closeAboutModal} />
|
||||||
) : null}
|
) : null}
|
||||||
|
<li className="MenuItem">Settings</li>
|
||||||
<li className="MenuItem">
|
|
||||||
<Link href='/guides'>Guides</Link>
|
|
||||||
</li>
|
|
||||||
</div>
|
|
||||||
<div className="MenuGroup">
|
|
||||||
<li className="MenuItem" onClick={props.logout}>Logout</li>
|
<li className="MenuItem" onClick={props.logout}>Logout</li>
|
||||||
</div>
|
</div>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
@ -59,8 +66,16 @@ const HeaderMenu = (props: Props) => {
|
||||||
{aboutOpen ? (
|
{aboutOpen ? (
|
||||||
<AboutModal close={closeAboutModal} />
|
<AboutModal close={closeAboutModal} />
|
||||||
) : null}
|
) : null}
|
||||||
{/* <li className="MenuItem" onClick={ () => props.navigate('guides') }>Guides</li> */}
|
|
||||||
</div>
|
</div>
|
||||||
|
<div className="MenuGroup">
|
||||||
|
<li className="MenuItem">
|
||||||
|
<Link href='/teans'>Teams</Link>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li className="MenuItem">
|
||||||
|
<Link href='/guides'>Guides</Link>
|
||||||
|
</li>
|
||||||
|
</div>
|
||||||
<div className="MenuGroup">
|
<div className="MenuGroup">
|
||||||
<li className="MenuItem" onClick={openLoginModal}>Log in</li>
|
<li className="MenuItem" onClick={openLoginModal}>Log in</li>
|
||||||
{loginOpen ? (
|
{loginOpen ? (
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ $grey-50: #888;
|
||||||
$grey-70: #C6C6C6;
|
$grey-70: #C6C6C6;
|
||||||
$grey-80: #E9E9E9;
|
$grey-80: #E9E9E9;
|
||||||
$grey-90: #F5F5F5;
|
$grey-90: #F5F5F5;
|
||||||
|
$grey-100:#FAFAFA;
|
||||||
$background-color: $grey-90;
|
$background-color: $grey-90;
|
||||||
|
|
||||||
$blue: #61B3FF;
|
$blue: #61B3FF;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue