-
-
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
Add anchorDirection prop to allow right-aligned Components #72
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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 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 :) |
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.
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