1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-11-15 09:44:53 +01:00

menu tweaks

This commit is contained in:
Matthias Kretschmann 2020-10-05 20:40:41 +02:00
parent 6eff6883af
commit 01655c883a
Signed by: m
GPG Key ID: 606EEEF3C479A91F
4 changed files with 33 additions and 10 deletions

View File

@ -59,13 +59,19 @@
.navigation li { .navigation li {
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
margin-left: var(--spacer);
}
@media screen and (min-width: 60rem) {
.navigation li {
margin-left: calc(var(--spacer) * 2);
}
} }
.navigation button, .navigation button,
.link { .link {
display: block; display: block;
padding: calc(var(--spacer) / 2); padding: calc(var(--spacer) / 2);
margin-left: var(--spacer);
text-transform: uppercase; text-transform: uppercase;
color: var(--brand-grey-light); color: var(--brand-grey-light);
font-weight: var(--font-weight-bold); font-weight: var(--font-weight-bold);

View File

@ -45,14 +45,14 @@ export default function Menu(): ReactElement {
</Link> </Link>
<ul className={styles.navigation}> <ul className={styles.navigation}>
<li>
<Wallet />
</li>
{menu.map((item: MenuItem) => ( {menu.map((item: MenuItem) => (
<li key={item.name}> <li key={item.name}>
<MenuLink item={item} /> <MenuLink item={item} />
</li> </li>
))} ))}
<li>
<Wallet />
</li>
<li> <li>
<UserPreferences /> <UserPreferences />
</li> </li>

View File

@ -1,12 +1,31 @@
.preferences { .preferences {
padding: calc(var(--spacer) / 2); padding: calc(var(--spacer) / 5) calc(var(--spacer) / 4)
margin-left: var(--spacer); calc(var(--spacer) / 5) 0;
cursor: pointer; cursor: pointer;
} }
.preferences svg {
display: inline-block;
vertical-align: middle;
}
.preferences[aria-expanded='true'] svg {
transform: rotate(180deg);
}
.preferences svg:last-child {
width: 1em;
height: 1em;
fill: var(--brand-grey-lighter);
margin-left: calc(var(--spacer) / 4);
transition: transform 0.2s ease-out;
}
.icon { .icon {
fill: var(--brand-grey-light); fill: var(--brand-grey-light);
transition: 0.2s ease-out; transition: 0.2s ease-out;
width: 1.2em;
height: 1.2em;
} }
.preferences:hover .icon, .preferences:hover .icon,
@ -16,10 +35,6 @@
fill: var(--brand-grey); fill: var(--brand-grey);
} }
.preferences[aria-expanded='true'] .icon {
transform: rotate(180deg);
}
.preferencesDetails { .preferencesDetails {
padding: calc(var(--spacer) / 2); padding: calc(var(--spacer) / 2);
} }

View File

@ -4,6 +4,7 @@ import { ReactComponent as Cog } from '../../../images/cog.svg'
import styles from './index.module.css' import styles from './index.module.css'
import Currency from './Currency' import Currency from './Currency'
import Debug from './Debug' import Debug from './Debug'
import { ReactComponent as Caret } from '../../../images/caret.svg'
export default function UserPreferences(): ReactElement { export default function UserPreferences(): ReactElement {
return ( return (
@ -18,6 +19,7 @@ export default function UserPreferences(): ReactElement {
className={styles.preferences} className={styles.preferences}
> >
<Cog aria-label="Preferences" className={styles.icon} /> <Cog aria-label="Preferences" className={styles.icon} />
<Caret aria-hidden="true" />
</Tooltip> </Tooltip>
) )
} }