Skip to content

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

Merged
majapw merged 1 commit intomasterfrom
maja-remove-default-styling-from-custom-month-nav
Jun 21, 2018
Merged

Remove default styling (border, etc.) from custom month nav buttons#1204
majapw merged 1 commit intomasterfrom
maja-remove-default-styling-from-custom-month-nav

Conversation

@majapw
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown

@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

Comment thread src/components/DayPickerNavigation.jsx Outdated
);
}

const isDefaultNav = isDefaultNavNext || (!isVerticalScrollable && isDefaultNavPrev);
Copy link
Copy Markdown
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.

4 participants