Add a custom rule to prevent colors from being hardcoded outside of theme (#288)
* Add a custom rule to prevent colors from being hardcoded in ESLint * Refactor colors * Create packages folder and fix colors * Remove external dependency for css alphabetical order linting * Fix install with yarn --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -2,7 +2,7 @@ import styled from '@emotion/styled';
|
||||
|
||||
export const HoverableMenuItem = styled.div`
|
||||
align-items: center;
|
||||
background: rgba(0, 0, 0, 0);
|
||||
background: ${(props) => props.theme.primaryBackground};
|
||||
border-radius: 4px;
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
@ -14,6 +14,6 @@ export const HoverableMenuItem = styled.div`
|
||||
width: 100%;
|
||||
|
||||
&:hover {
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
background: ${(props) => props.theme.lightBackgroundTransparent};
|
||||
}
|
||||
`;
|
||||
|
||||
@ -26,7 +26,7 @@ const StyledCalendarContainer = styled.div<StyledCalendarContainerProps>`
|
||||
background: ${(props) => props.theme.secondaryBackground};
|
||||
border: 1px solid ${(props) => props.theme.primaryBorder};
|
||||
border-radius: 8px;
|
||||
box-shadow: 0px 3px 12px rgba(0, 0, 0, 0.09);
|
||||
box-shadow: ${(props) => props.theme.modalBoxShadow};
|
||||
left: -10px;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
|
||||
@ -127,7 +127,7 @@ const StyledContainer = styled.div`
|
||||
margin: 2px;
|
||||
|
||||
&:hover {
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
background: ${(props) => props.theme.lightBackgroundTransparent};
|
||||
}
|
||||
|
||||
&:first-of-type {
|
||||
@ -172,7 +172,7 @@ const StyledContainer = styled.div`
|
||||
border-radius: 4px;
|
||||
padding-top: 6px;
|
||||
&:hover {
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
background: ${(props) => props.theme.lightBackgroundTransparent};
|
||||
}
|
||||
}
|
||||
& .react-datepicker__navigation--previous {
|
||||
|
||||
@ -90,7 +90,7 @@ const StyledDropdownItem = styled.li`
|
||||
width: calc(160px - ${(props) => props.theme.spacing(4)});
|
||||
|
||||
&:hover {
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
background: ${(props) => props.theme.lightBackgroundTransparent};
|
||||
}
|
||||
`;
|
||||
|
||||
@ -112,7 +112,7 @@ const StyledDropdownTopOption = styled.li`
|
||||
calc(${(props) => props.theme.spacing(2)});
|
||||
|
||||
&:hover {
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
background: ${(props) => props.theme.lightBackgroundTransparent};
|
||||
}
|
||||
user-select: none;
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user