Signed-off-by: Ky <virginie.ky@gmail.com>
This commit is contained in:
Ky 2020-04-26 19:30:23 +02:00
parent ef8afac70e
commit 771df8dfb7
10 changed files with 167 additions and 182 deletions

View File

@ -10,16 +10,12 @@ const MenuDropdown = styled(DropdownMenu)`
box-shadow: 0px 2px 4px rgba(227, 233, 243, 0.5); box-shadow: 0px 2px 4px rgba(227, 233, 243, 0.5);
transform: translate3d(-178px, 28px, 0px) !important; transform: translate3d(-178px, 28px, 0px) !important;
${({ isopen }) => { ${({ isopen }) =>
if (isopen === 'true') { isopen &&
return ` `
border-top-color: #aed4fb !important; border-top-color: #aed4fb !important;
border-top-right-radius: 0; border-top-right-radius: 0;
`; `}
}
return '';
}}
`; `;
export default MenuDropdown; export default MenuDropdown;

View File

@ -13,18 +13,15 @@ const Button = styled(PlusButton)`
} }
} }
${({ hasError }) => { ${({ hasError }) =>
if (hasError) { hasError &&
return ` `
background-color: #FAA684; background-color: #FAA684;
:before, :after { :before, :after {
background-color: #F64D0A; background-color: #F64D0A;
} }
`; `}
}
return '';
}}
&.isOpen { &.isOpen {
transform: rotate(-45deg); transform: rotate(-45deg);
} }

View File

@ -1,4 +1,4 @@
import styled, { css } from 'styled-components'; import styled from 'styled-components';
const ComponentsPicker = styled.div` const ComponentsPicker = styled.div`
overflow: hidden; overflow: hidden;
@ -13,7 +13,7 @@ const ComponentsPicker = styled.div`
${({ isOpen }) => ${({ isOpen }) =>
isOpen && isOpen &&
css` `
max-height: 260px; max-height: 260px;
`} `}

View File

@ -1,4 +1,4 @@
import styled, { css } from 'styled-components'; import styled from 'styled-components';
const Div = styled.div` const Div = styled.div`
padding-left: 0; padding-left: 0;
@ -41,9 +41,9 @@ const Label = styled.label`
border-radius: 3px; border-radius: 3px;
} }
${({ value }) => { ${({ value }) =>
if (value === true) { value &&
return css` `
font-weight: 500; font-weight: 500;
&:after { &:after {
content: '\f00c'; content: '\f00c';
@ -56,11 +56,7 @@ const Label = styled.label`
color: #1c5de7; color: #1c5de7;
transition: all 0.2s; transition: all 0.2s;
} }
`; `}
}
return '';
}}
`; `;
export { Div, Label }; export { Div, Label };

View File

@ -1,4 +1,4 @@
import styled, { css } from 'styled-components'; import styled from 'styled-components';
const Wrapper = styled.div` const Wrapper = styled.div`
display: flex; display: flex;
@ -7,16 +7,14 @@ const Wrapper = styled.div`
height: 30px; height: 30px;
width: 100%; width: 100%;
padding: 0 5px; padding: 0 5px;
${({ isComponent }) => {
if (isComponent) { ${({ isComponent }) =>
return css` isComponent &&
`
height: 34px; height: 34px;
padding: 0; padding: 0;
`; `}
}
return '';
}}
border-radius: 2px; border-radius: 2px;
> div { > div {
width: 100%; width: 100%;

View File

@ -10,13 +10,11 @@ const EmptyComponent = styled.div`
text-align: center; text-align: center;
background-color: #fff; background-color: #fff;
${({ hasMinError }) => { ${({ hasMinError }) =>
if (hasMinError) { hasMinError &&
return 'border-color: #FAA684'; `
} border-color: #FAA684
`}
return '';
}}
> p { > p {
color: #9ea7b8; color: #9ea7b8;