-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(styled-components): upgrade styled-components to v4 (#190)
* feat(styled-components): upgrade styled-components to v4 * fix(DateRangePickerInput): remove comments * fix(styled-components): rename files and restructure directory * fix(DatePickerStyles): disable no-descending-specificity rule for one block * fix(THead): replace sc-custom with sc-selector
- Loading branch information
1 parent
f7c6474
commit 8f2a115
Showing
21 changed files
with
326 additions
and
322 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
import { createGlobalStyle } from 'styled-components'; | ||
import reactDayPickerStyles from '!!raw-loader!react-day-picker/lib/style.css'; // eslint-disable-line | ||
|
||
const DatePickerStyles = createGlobalStyle` | ||
${reactDayPickerStyles} | ||
.DayPicker { | ||
background: ${(props) => props.theme.color.white}; | ||
position: relative; | ||
outline: none; | ||
z-index: 1; | ||
&-wrapper { | ||
&& { | ||
padding: ${(props) => props.theme.px(4)}; | ||
outline: none; | ||
} | ||
} | ||
&-Month { | ||
&& { | ||
margin: 0; | ||
} | ||
& + & { | ||
margin-left: ${(props) => props.theme.px(4)}; | ||
} | ||
} | ||
&-Weekday { | ||
&& { | ||
padding: ${(props) => props.theme.px(1)}; | ||
font-size: ${(props) => props.theme.fontSize.s}; | ||
} | ||
} | ||
&-Day { | ||
border-radius: 0 !important; | ||
&& { | ||
padding: ${(props) => props.theme.px(1)}; | ||
font-weight: ${(props) => props.theme.fontWeight.normal}; | ||
font-size: ${(props) => props.theme.fontSize.s}; | ||
outline: none; | ||
} | ||
&:not(&--disabled):not(&--selected):not(&--outside):hover { | ||
&& { | ||
background-color: ${(props) => props.theme.color.primaryLighter}; | ||
} | ||
} | ||
&--today:not(&--disabled):not(&--outside) { | ||
&& { | ||
color: ${(props) => props.theme.color.greyDarker}; | ||
} | ||
} | ||
/* stylelint-disable no-descending-specificity */ | ||
&--selected:not(&--disabled):not(&--outside) { | ||
&& { | ||
color: ${(props) => props.theme.color.white}; | ||
background-color: ${(props) => props.theme.color.primary}; | ||
} | ||
} | ||
&--selected:not(&--start):not(&--end):not(&--disabled):not(&--outside) { | ||
&& { | ||
color: ${(props) => props.theme.color.greyDarker}; | ||
background-color: ${(props) => props.theme.color.primaryLighter}; | ||
} | ||
} | ||
/* stylelint-enable no-descending-specificity */ | ||
} | ||
} | ||
`; | ||
|
||
export default DatePickerStyles; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.