-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
Change Popover.Arrow and Tooltip.Arrow position according to parent position #100
Comments
Besides being too hidden magic, it'll require a lot of work and ugly code to happen (with bugs, probably). Closing for now. |
diegohaz
added a commit
that referenced
this issue
Jul 30, 2018
Closes #130 Closes #100 BREAKING CHANGE: `Hidden` styles have been changed. Now it has a `transform` property by default. This affects all the other components that use `Hidden`: `Backdrop`, `Overlay`, `Sidebar`, `Popover`, `Tooltip`, `Step` and `TabsPanel`. BREAKING CHANGE: `Perpendicular` has been removed. `Popover` and `Tooltip` use [popper.js](https://github.com/FezVrasta/popper.js) instead. It affects also `PopoverArrow` and `TooltipArrow`, which don't accept `Perpendicular` props anymore. BREAKING CHANGE: `pos` prop on `Popover` and `Tooltip` has been replaced by `placement` prop, which accepts all the `pos` values plus `-start` and `-end` versions. Before: ```jsx <Popover pos="top" align="start" /> ``` After: ```jsx <Popover placement="top-start" /> ``` BREAKING CHANGE: `PopoverArrow` and `TooltipArrow` don't accept `pos` anymore. Their position and angle are now automatically set according to `Popover` and `Tooltip` `placement` prop. Before: ```jsx <Popover pos="top"> <Popover.Arrow pos="bottom" /> </Popover> ``` After: ```jsx <Popover placement="top"> <Popover.Arrow /> </Popover> ``` BREAKING CHANGE: `popoverId` state on `PopoverContainer` is now set on `componentDidMount` instead of on initial state. This means that it'll be `undefined` on the first render, but will have a consistent behavior when using [`context`](https://github.com/diegohaz/constate#context) prop. BREAKING CHANGE: `Tooltip` styles have been changed. Now it has a slightly larger `font-size` and opaque `background-color`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, if we pass a different
pos
toTooltip
orPopover
, we also need to change thepos
prop on theArrow
component.That's kind of annoying. Setting
pos="bottom"
onTooltip
should automatically and correctly positionTooltip.Arrow
.We can't reliably set props on
Arrow
fromTooltip
. The best option we have, I guess, is to change the styles. Something like this:In order to get
Perpendicular
styles, we should usegetStyle
fromstyled-tools
:The text was updated successfully, but these errors were encountered: