mirror of
https://github.com/strapi/strapi.git
synced 2025-10-29 00:49:49 +00:00
leftmenu alignment and border listbutton
Signed-off-by: Virginie Ky <virginie.ky@gmail.com>
This commit is contained in:
parent
a70991a37e
commit
83b326e9a5
@ -0,0 +1,15 @@
|
||||
import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
|
||||
import colors from '../../assets/styles/colors';
|
||||
|
||||
const LeftMenuIcon = styled(({ ...props }) => <FontAwesomeIcon {...props} icon="circle" />)`
|
||||
position: absolute;
|
||||
top: calc(50% - 0.3rem);
|
||||
left: 1.4rem;
|
||||
font-size: 0.7rem;
|
||||
color: ${colors.leftMenu.darkGrey};
|
||||
`;
|
||||
|
||||
export default LeftMenuIcon;
|
||||
@ -2,9 +2,12 @@ import React, { memo } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { NavLink } from 'react-router-dom';
|
||||
|
||||
import Icon from './Icon';
|
||||
|
||||
function LeftMenuLink({ children, to }) {
|
||||
return (
|
||||
<NavLink to={to}>
|
||||
<Icon />
|
||||
<p>{children}</p>
|
||||
</NavLink>
|
||||
);
|
||||
|
||||
@ -5,8 +5,7 @@ import colors from '../../assets/styles/colors';
|
||||
const List = styled.ul`
|
||||
margin-bottom: 0;
|
||||
padding-left: 0;
|
||||
max-height: ${props =>
|
||||
props.numberOfVisibleItems ? `${props.numberOfVisibleItems * 35}px` : null};
|
||||
max-height: 178px;
|
||||
overflow-y: scroll;
|
||||
li {
|
||||
position: relative;
|
||||
|
||||
@ -4,6 +4,7 @@ const ListButton = styled.div`
|
||||
button {
|
||||
width: 100%;
|
||||
height: 54px;
|
||||
border: 0;
|
||||
border-top: 1px solid #aed4fb;
|
||||
color: #007eff;
|
||||
font-weight: 500;
|
||||
|
||||
@ -8,7 +8,7 @@ import styled from 'styled-components';
|
||||
|
||||
const StyledCustomLink = styled.div`
|
||||
padding-left: 15px;
|
||||
padding-top: 9px;
|
||||
padding-top: 10px;
|
||||
line-height: 0;
|
||||
margin-left: -3px;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user