mirror of
https://github.com/strapi/strapi.git
synced 2025-10-30 09:23:28 +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 PropTypes from 'prop-types';
|
||||||
import { NavLink } from 'react-router-dom';
|
import { NavLink } from 'react-router-dom';
|
||||||
|
|
||||||
|
import Icon from './Icon';
|
||||||
|
|
||||||
function LeftMenuLink({ children, to }) {
|
function LeftMenuLink({ children, to }) {
|
||||||
return (
|
return (
|
||||||
<NavLink to={to}>
|
<NavLink to={to}>
|
||||||
|
<Icon />
|
||||||
<p>{children}</p>
|
<p>{children}</p>
|
||||||
</NavLink>
|
</NavLink>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -5,8 +5,7 @@ import colors from '../../assets/styles/colors';
|
|||||||
const List = styled.ul`
|
const List = styled.ul`
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
max-height: ${props =>
|
max-height: 178px;
|
||||||
props.numberOfVisibleItems ? `${props.numberOfVisibleItems * 35}px` : null};
|
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
li {
|
li {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|||||||
@ -4,6 +4,7 @@ const ListButton = styled.div`
|
|||||||
button {
|
button {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 54px;
|
height: 54px;
|
||||||
|
border: 0;
|
||||||
border-top: 1px solid #aed4fb;
|
border-top: 1px solid #aed4fb;
|
||||||
color: #007eff;
|
color: #007eff;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import styled from 'styled-components';
|
|||||||
|
|
||||||
const StyledCustomLink = styled.div`
|
const StyledCustomLink = styled.div`
|
||||||
padding-left: 15px;
|
padding-left: 15px;
|
||||||
padding-top: 9px;
|
padding-top: 10px;
|
||||||
line-height: 0;
|
line-height: 0;
|
||||||
margin-left: -3px;
|
margin-left: -3px;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user