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

Expose position prop in DotTip component #14972

Merged
merged 9 commits into from Jul 11, 2019
8 changes: 8 additions & 0 deletions packages/nux/src/components/dot-tip/README.md
Expand Up @@ -26,6 +26,14 @@ A string that uniquely identifies the tip. Identifiers should be prefixed with t
- Type: `string`
- Required: Yes

### position

The direction in which the popover should open relative to its parent node. Specify y- and x-axis as a space-separated string. Supports `"top"`, `"middle"`, `"bottom"` y axis, and `"left"`, `"center"`, `"right"` x axis.

- Type: `String`
- Required: No
- Default: `"middle right"`

### children

Any React element or elements can be passed as children. They will be rendered within the tip bubble.
3 changes: 2 additions & 1 deletion packages/nux/src/components/dot-tip/index.js
Expand Up @@ -20,6 +20,7 @@ function onClick( event ) {
}

export function DotTip( {
position = 'middle right',
children,
isVisible,
hasNextTip,
Expand All @@ -33,7 +34,7 @@ export function DotTip( {
return (
<Popover
className="nux-dot-tip"
position="middle right"
position={ position }
noArrow
focusOnMount="container"
getAnchorRect={ getAnchorRect }
Expand Down