Skip to content
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

Remove default styling (border, etc.) from custom month nav buttons #1204

Merged
merged 1 commit into from
Jun 21, 2018

Conversation

majapw
Copy link
Collaborator

@majapw majapw commented Jun 8, 2018

This change removes all default styling from custom navigation buttons (including position). This is a breaking change.

I'm wondering if I should take this opportunity to change navNext/navPrev to render props a la the rest of the repo. Thoughts?

Screenshots:

Default
screen shot 2018-06-19 at 2 02 54 pm
screen shot 2018-06-19 at 2 03 02 pm
screen shot 2018-06-19 at 2 03 19 pm

Custom
screen shot 2018-06-19 at 2 05 55 pm
screen shot 2018-06-19 at 2 06 04 pm
screen shot 2018-06-19 at 2 03 35 pm

to: @ljharb @amhunt

@coveralls
Copy link

coveralls commented Jun 8, 2018

Coverage Status

Coverage increased (+0.009%) to 84.794% when pulling 47d2da8 on maja-remove-default-styling-from-custom-month-nav into 2081bd8 on master.

@majapw majapw force-pushed the maja-remove-default-styling-from-custom-month-nav branch from 5486ecf to 2f2f15c Compare June 19, 2018 20:57
@majapw majapw changed the title WIP: Remove default styling (border, etc.) from custom month nav buttons Remove default styling (border, etc.) from custom month nav buttons Jun 19, 2018
@majapw majapw added the semver-major: breaking change A non-backwards-compatible change; anything that breaks code - including adding a peerDep. label Jun 19, 2018
@majapw majapw force-pushed the maja-remove-default-styling-from-custom-month-nav branch from 2f2f15c to c1d8979 Compare June 19, 2018 21:05
Copy link

@a15n a15n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excited to see this flexibility added to the library

@@ -95,13 +95,21 @@ function DayPickerNavigation({
);
}

const isDefaultNav = isDefaultNavNext || (!isVerticalScrollable && isDefaultNavPrev);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this might be more clear as

const isDefaultNav = isVerticalScrollable ? isDefaultNavNext : (isDefaultNavNext || isDefaultNavPrev);

(i found the negation confusing)

@majapw majapw force-pushed the maja-remove-default-styling-from-custom-month-nav branch from c1d8979 to 47d2da8 Compare June 21, 2018 16:55
@majapw majapw merged commit fbbd408 into master Jun 21, 2018
@majapw majapw deleted the maja-remove-default-styling-from-custom-month-nav branch June 21, 2018 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-major: breaking change A non-backwards-compatible change; anything that breaks code - including adding a peerDep.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants