-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
export CustomizableCalendarDay styles, add story #1095
Conversation
modifiers.has('selected-start') && selectedStartStyles, | ||
modifiers.has('selected-end') && selectedEndStyles, | ||
isOutsideRange && blockedOutOfRangeStyles, | ||
getStyles(defaultStylesWithHover, isHovered), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couldn't think of a good intermediate name so I just execute everything inline
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems reasonable to me
color: 'blue', | ||
}, | ||
}, | ||
// or immutability-helper's update |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm not sure this library needs calling out in an example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think in your description, you probably meant
const newDefaultStyles = {
...defaultStyles,
color: 'blue',
};
and not the other way around, right? :P
In any case, looks great to me!
modifiers.has('selected-start') && selectedStartStyles, | ||
modifiers.has('selected-end') && selectedEndStyles, | ||
isOutsideRange && blockedOutOfRangeStyles, | ||
getStyles(defaultStylesWithHover, isHovered), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems reasonable to me
Thanks for the review. Ready to merge |
Previously if you wanted to update a single CSS style from CustomizableCalendarDay you'd need to (1) make the singular change and (2) duplicate all of the original CSS.
With this change we can import the style definitions and update the single element using es6 spread operator or update.