Open crapthings opened 5 years ago
different code but same situation
// @flow
import * as React from 'react';
import classNames from 'classnames';
import styled, { css } from 'styled-components';
import { MenuDown } from 'mdi-material-ui';
import ListItemIcon from '@material-ui/core/ListItemIcon';
import Collapse from '@material-ui/core/Collapse';
import { withRouter, NavLink } from 'react-router-dom';
const navItemMixin = css`
display: flex;
align-items: center;
text-decoration: none;
color: #929292;
padding-left: 20px;
padding-right: 20px;
height: 40px;
color: #929292;
cursor: pointer;
transition: background-color 0.1s, opacity 0.1s;
&:focus,
&:hover {
background-color: #1d1632;
}
&:active {
opacity: 0.8;
}
`;
const StyledNavLink = styled(NavLink)`
${navItemMixin};
&.active {
color: #ffffff;
${StyledListItemIcon} {
color: #7f6dea;
}
}
`;
const StyledNestedNavLink = styled(StyledNavLink)`
padding-left: 52px;
font-size: 12px;
`;
const StyledNavItemBody = styled.div`
max-width: 100%;
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
`;
type Props = {
to: string | null,
label: string,
iconComponent: React.Node,
childItems?: Array<any>,
};
type State = {
open: boolean,
};