Adjust menu highlights (#3461)

* Adjust menu highlights

* Update packages/apps/src/Menu/Grouping.tsx

* Slight toning down
This commit is contained in:
Jaco Greeff 2020-08-21 09:20:33 +02:00 committed by GitHub
parent 8f99bc8c33
commit f845f2a12f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 26 additions and 15 deletions

View File

@ -28,7 +28,7 @@ function ChainInfo ({ className }: Props): React.ReactElement<Props> {
return (
<div className={className}>
<div
className={`apps--SideBar-logo-inner${canToggle ? ' isClickable' : ''}`}
className={`apps--SideBar-logo-inner${canToggle ? ' isClickable ui--highlight--hover-color' : ''}`}
onClick={toggleEndpoints}
>
<ChainImg />
@ -79,8 +79,6 @@ export default React.memo(styled(ChainInfo)`
.ui--Icon.dropdown,
> div.info {
color: white;
opacity: 0.85;
text-align: right;
vertical-align: middle;
}
@ -91,17 +89,17 @@ export default React.memo(styled(ChainInfo)`
width: 1rem;
}
> div.info {
.info {
flex: 1;
padding-right: 0.5rem;
> div.bestNumber,
> div.chain {
.bestNumber,
.chain {
font-size: 0.9rem;
line-height: 1.2;
}
> div.runtimeVersion {
.runtimeVersion {
font-size: 0.75rem;
line-height: 1.2;
}

View File

@ -14,7 +14,7 @@ interface Props extends Group {
className?: string;
}
function Grouping ({ className, name, routes }: Props): React.ReactElement<Props> {
function Grouping ({ className = '', name, routes }: Props): React.ReactElement<Props> {
if (routes.length === 1) {
return (
<Item
@ -76,14 +76,14 @@ export default React.memo(styled(Grouping)`
&:hover {
.groupHdr,
.groupMenu li {
background: rgba(245, 243, 241, 0.11);
background: rgba(255, 255, 255, 0.5);
}
.groupMenu {
display: block;
> li:hover {
background: rgba(245, 243, 241, 0.22);
background: transparent;
}
}
}

View File

@ -21,7 +21,7 @@ function Item ({ className = '', route: { Modal, href, icon, name, text, useCoun
const count = useCounter();
return (
<li className={`${className}${count ? ' withCounter' : ''}`}>
<li className={`${className}${count ? ' withCounter' : ''} ui--highlight--hover-color`}>
<a
href={Modal ? undefined : (href || `#/${name}`)}
onClick={Modal ? toggleModal : undefined}

View File

@ -33,10 +33,8 @@ function NodeInfo ({ className = '' }: Props): React.ReactElement<Props> {
export default React.memo(styled(NodeInfo)`
background: transparent;
color: white;
font-size: 0.9rem;
line-height: 1.2;
opacity: 0.85;
padding: 0 1.5rem;
text-align: right;

View File

@ -170,6 +170,17 @@ export default React.memo(styled(Menu)`
&.menuBg,
.menuBg {
&:after {
background: #fff;
bottom: 0;
content: ' ';
left: 0;
position: absolute;
right: 0;
top: 0;
z-index: -2;
}
&:before {
background; #fff;
bottom: 0;
@ -184,8 +195,9 @@ export default React.memo(styled(Menu)`
&:before {
bottom: 0;
content: ' ';
filter: invert(0.4) brightness(0.7);
filter: invert(0.2) brightness(1.2);
left: 0;
opacity: 0.15;
position: absolute;
right: 0;
top: 0;
@ -215,7 +227,6 @@ export default React.memo(styled(Menu)`
}
.menuItems {
color: #f5f4f3;
flex: 1 1;
list-style: none;
margin: 0 1rem 0 0;

View File

@ -55,6 +55,10 @@ export default createGlobalStyle<Props>`
background: ${(props: Props) => `linear-gradient(90deg, ${props.uiHighlight || defaultHighlight}, transparent)`};
}
.ui--highlight--hover-color:hover {
color: ${getHighlight} !important;
}
.ui--highlight--icon {
.ui--Icon {
color: ${getHighlight} !important;