Add anchorDirection prop to allow right-aligned Components#72
Conversation
| left: 162px; | ||
| } | ||
| .DateRangePicker__picker--direction-right.DateRangePicker__picker--end::before { | ||
| right: 101px; |
There was a problem hiding this comment.
unsure if there's a measurement strategy that should be used to calculate these offsets, just tried to eye them. Let me know if there's a calculation you were relying on (and the we can add a $sass-variable)
There was a problem hiding this comment.
They're kind of yoloed right now, which is like, well a whole thing. I think we should figure out some way to pin them to the input instead of the picker itself. It will help us with #83 as well.
majapw
left a comment
There was a problem hiding this comment.
I think that the naming feels a little off to me. Can we rename the prop to anchorDirection and the constants to ANCHOR_LEFT and ANCHOR_RIGHT maybe. That makes more sense in my head. What do you think?
The change looks great and I think once we settle on the naming scheme we can merge it in.
dc8f6b8 to
fde2a41
Compare
|
@majapw fixes added |
|
What's necessary to see this merged? This would be huge for us. Do you need any help? |
|
Looking into it today! I think it's basically ready. :) On Tue, Oct 11, 2016, 8:40 AM Oliver Shaw notifications@github.com wrote:
|
DateRangePicker and SingleDatePicker have a new prop, directionAnchor that will align the components to the left/right side of the page. This prop has two new constants, DIRECTION_ANCHOR_LEFT (default) and DIRECTION_ANCHOR_RIGHT.
fde2a41 to
f67c18c
Compare
|
@majapw just fixed a rebase issue with my other PR, let me know if there are any concerns :) |
majapw
left a comment
There was a problem hiding this comment.
Wonderful! Thank youuuu. Hopefully a lot of this css nonsense will be easier once we get the responsive PR going.
|
I don't really know why the approval check wasn't passing. :/ |
|
Thanks guys, this is awesome! Is this worthy of a version bump? |
|
Just released v3.3.0 which should include this change! :) |
DateRangePicker and SingleDatePicker have a new prop, directionAnchor
that will align the components to the left/right side of the page.
This prop has two new constants, DIRECTION_ANCHOR_LEFT (default)
and DIRECTION_ANCHOR_RIGHT.
solves issue #71