diff --git a/components-e2e/cypress/integration/components/DropdownMenu.spec.js b/components-e2e/cypress/integration/components/DropdownMenu.spec.js
index f8c781010..8e5fded39 100644
--- a/components-e2e/cypress/integration/components/DropdownMenu.spec.js
+++ b/components-e2e/cypress/integration/components/DropdownMenu.spec.js
@@ -1,7 +1,7 @@
describe("DropdownMenu", () => {
const getOpenButton = () => cy.get("button[aria-label='Open']");
const getCloseButton = () => cy.get("button[aria-label='Close']");
- const getTrigger = () => cy.get("button[class*='IconicButton'");
+ const getTrigger = () => cy.get("button[class*='IconicButton']");
const getDropdownLink = () => cy.contains("Dropdown Link");
const getCustomTrigger = () => cy.contains("Custom Trigger");
const getDropdownContainer = () => cy.get(".nds-popper-pop-up");
@@ -12,7 +12,7 @@ describe("DropdownMenu", () => {
};
const assertDropdownIsClosed = () => {
getOpenButton().should("exist");
- cy.isNotInViewport(".nds-popper-pop-up");
+ cy.get(".nds-popper-pop-up").should("not.exist");
};
describe("default", () => {
@@ -46,9 +46,10 @@ describe("DropdownMenu", () => {
});
it("scrolls through the list on tabpress", () => {
- getTrigger()
- .click()
- .tab();
+ getTrigger().click();
+ // Add wait for dropdown to render
+ cy.wait(500);
+ getTrigger().tab();
getDropdownLink().should("be.focused");
});
diff --git a/components-e2e/cypress/integration/components/Tooltip.spec.js b/components-e2e/cypress/integration/components/Tooltip.spec.js
index 57c257215..49a928026 100644
--- a/components-e2e/cypress/integration/components/Tooltip.spec.js
+++ b/components-e2e/cypress/integration/components/Tooltip.spec.js
@@ -25,7 +25,7 @@ describe("Tooltip", () => {
cy.get('[aria-haspopup="true"]').trigger("mouseover");
cy.get('[aria-haspopup="true"]').trigger("mouseout");
cy.wait(2000);
- cy.isNotInViewport('[role="tooltip"]');
+ cy.get('[role="tooltip"]').should("not.exist");
});
});
});
diff --git a/components/src/Card/__snapshots__/Card.story.storyshot b/components/src/Card/__snapshots__/Card.story.storyshot
index e0c160d64..eab69a573 100644
--- a/components/src/Card/__snapshots__/Card.story.storyshot
+++ b/components/src/Card/__snapshots__/Card.story.storyshot
@@ -820,165 +820,7 @@ exports[`Storyshots Card Capacity Planing Cardset 1`] = `
}
- >
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ />
@@ -1790,165 +1632,7 @@ exports[`Storyshots Card Capacity Planing Cardset 1`] = `
}
- >
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ />
diff --git a/components/src/DropdownMenu/DropdownMenu.story.js b/components/src/DropdownMenu/DropdownMenu.story.js
index 1014b576e..14bf4b562 100644
--- a/components/src/DropdownMenu/DropdownMenu.story.js
+++ b/components/src/DropdownMenu/DropdownMenu.story.js
@@ -1,12 +1,13 @@
import React from "react";
import { storiesOf } from "@storybook/react";
-import { DropdownMenu, DropdownLink, DropdownButton, DropdownItem, Button } from "../index";
+import { DropdownMenu, DropdownLink, DropdownButton, DropdownItem, Button, Card, Text } from "../index";
const customColors = {
color: "white",
hoverColor: "white",
bgHoverColor: "black"
};
+const cards = Array.from({ length: 100 }, (v, k) => k + 1);
storiesOf("DropdownMenu", module)
.add("DropdownMenu", () => (
@@ -59,4 +60,17 @@ storiesOf("DropdownMenu", module)
Dropdown Link
{}}>Dropdown Button
+ ))
+ .add("Many dropdowns", () => (
+ <>
+ {cards.map(i => (
+
+ Card {i}
+
+ Dropdown Link
+ {}}>Dropdown Button
+
+
+ ))}
+ >
));
diff --git a/components/src/DropdownMenu/DropdownMenuContainer.js b/components/src/DropdownMenu/DropdownMenuContainer.js
index 368028e94..9a19c2422 100644
--- a/components/src/DropdownMenu/DropdownMenuContainer.js
+++ b/components/src/DropdownMenu/DropdownMenuContainer.js
@@ -30,9 +30,7 @@ const getMenuMargin = (placement, showArrow) => {
}
};
-const DropdownMenuContainer = styled(Box)(({ open, position, placement, showArrow, backgroundColor }) => ({
- ...position,
- top: open ? 0 : "-9999px",
+const DropdownMenuContainer = styled(Box)(({ dataPlacement, showArrow, backgroundColor }) => ({
backgroundColor: getThemeColor(backgroundColor),
borderRadius: theme.radii.medium,
borderTop: `1px solid ${getThemeColor(backgroundColor)}`,
@@ -40,7 +38,7 @@ const DropdownMenuContainer = styled(Box)(({ open, position, placement, showArro
boxShadow: theme.shadows.small,
padding: "7px 0",
zIndex: "100",
- ...getMenuMargin(placement, showArrow)
+ ...getMenuMargin(dataPlacement, showArrow)
}));
DropdownMenuContainer.propTypes = {
diff --git a/components/src/DropdownMenu/__snapshots__/DropdownMenu.story.storyshot b/components/src/DropdownMenu/__snapshots__/DropdownMenu.story.storyshot
index 9ace4a007..ba49d3420 100644
--- a/components/src/DropdownMenu/__snapshots__/DropdownMenu.story.storyshot
+++ b/components/src/DropdownMenu/__snapshots__/DropdownMenu.story.storyshot
@@ -521,171 +521,37094 @@ exports[`Storyshots DropdownMenu DropdownMenu 1`] = `
}
- >
-
+
+
+
+
+
+
+
+
+
+`;
+
+exports[`Storyshots DropdownMenu Many dropdowns 1`] = `
+
+
+
+
+
+
+
+
+
+
+ Card
+ 1
+
+
+
+
+ }
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+ />
+
+
+
+
+
+
+
+
+
+
+ Card
+ 2
+
+
+
+
+ }
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+ />
+
+
+
+
+
+
+
+
+
+
+ Card
+ 3
+
+
+
+
+ }
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+ />
+
+
+
+
+
+
+
+
+
+
+ Card
+ 4
+
+
+
+
+ }
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+ />
+
+
+
+
+
+
+
+
+
+
+ Card
+ 5
+
+
+
+
+ }
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+ />
+
+
+
+
+
+
+
+
+
+
+ Card
+ 6
+
+
+
+
+ }
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+ />
+
+
+
+
+
+
+
+
+
+
+ Card
+ 7
+
+
+
+
+ }
+ >
+
+
+
+
+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
+
+
+
+
+
+
+
+
+
+
+ Card
+ 91
+
+
+
+
+ }
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+ />
+
+
+
+
+
+
+
+
+
+
+ Card
+ 92
+
+
+
+
+ }
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+ />
+
+
+
+
+
+
+
+
+
+
+ Card
+ 93
+
+
+
+
+ }
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+ />
+
+
+
+
+
+
+
+
+
+
+ Card
+ 94
+
+
+
+
+ }
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+ />
+
+
+
+
+
+
+
+
+
+
+ Card
+ 95
+
+
+
+
+ }
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+ />
+
+
+
+
+
+
+
+
+
+
+ Card
+ 96
+
+
+
+
+ }
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+ />
+
+
+
+
+
+
+
+
+
+
+ Card
+ 97
+
+
+
+
+ }
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+ />
+
+
+
+
+
+
+
+
+
+
+ Card
+ 98
+
+
+
+
+ }
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+ />
+
+
+
+
+
+
+
+
+
+
+ Card
+ 99
+
+
+
+
+ }
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+ }
+ />
+
+
+
+
+
+
+
+
+
+
+ Card
+ 100
+
+
+
+
+ }
+ >
+
+
+
-
-
- Dropdown Link
-
-
-
+
+
+
+
+
+
+
+
+
- Dropdown Button
+
-
-
-
-
-
-
-
-
-
-
-
+ }
+ />
+
+
+
+
+
+
@@ -1181,201 +38104,41 @@ exports[`Storyshots DropdownMenu Set to disabled 1`] = `
"boundariesElement": "viewport",
"preventOverflow": Object {
"boundariesElement": "viewport",
- "enabled": true,
- "padding": 8,
- },
- }
- }
- placement="bottom-start"
- positionFixed={false}
- referenceElement={
-
- }
- >
-
-
-
-
+
+
+ }
+ />
@@ -1917,7 +38680,8 @@ exports[`Storyshots DropdownMenu set to defaultOpen 1`] = `
onFocus={[Function]}
onMouseDown={[Function]}
open={true}
- position={
+ showArrow={true}
+ style={
Object {
"left": 0,
"opacity": 0,
@@ -1926,7 +38690,6 @@ exports[`Storyshots DropdownMenu set to defaultOpen 1`] = `
"top": 0,
}
}
- showArrow={true}
theme={
Object {
"borders": Array [],
@@ -2015,12 +38778,21 @@ exports[`Storyshots DropdownMenu set to defaultOpen 1`] = `
}
>
-
-
- }
- />
-
-
-
-
-
-
-
-
-
-
-
-
- }
- >
-
+
+
+ }
+ />
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+ }
+ />
@@ -3248,220 +39875,60 @@ exports[`Storyshots DropdownMenu with custom colors 1`] = `
-
-
-
-
- }
- >
-
+
-
-
-
+
+
+ }
+ />
@@ -3927,219 +40394,74 @@ exports[`Storyshots DropdownMenu with custom item 1`] = `
viewBox="0 0 24 24"
width="32px"
>
-
-
- }
- />
-
-
-
-
-
-
-
-
-
-
-
-
- }
- >
-
+
+ }
+ />
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+ }
+ />
@@ -4565,167 +40887,7 @@ exports[`Storyshots DropdownMenu with custom trigger 1`] = `
Custom Trigger
}
- >
-
-
-
-
+ />
diff --git a/components/src/Popper/Popper.js b/components/src/Popper/Popper.js
index c48e41802..f3e805a34 100644
--- a/components/src/Popper/Popper.js
+++ b/components/src/Popper/Popper.js
@@ -139,31 +139,36 @@ const Popper = React.forwardRef(
{({ ref, style, placement, arrowProps }) => (
<>
- {React.cloneElement(
- children,
- {
- open: isOpen,
- ref,
- id,
- position: style,
- dataPlacement: placement,
- className: `${children.props.className || ""} nds-popper-pop-up`,
- ...eventHandlers
- },
- [
- ...renderInnerChildren(),
- showArrow && (
-
- )
- ]
- )}
+ {isOpen &&
+ React.cloneElement(
+ children,
+ {
+ open: isOpen,
+ ref,
+ id,
+ style: {
+ position: "absolute",
+ ...(isOpen ? style : null),
+ top: isOpen ? 0 : "-9999px"
+ },
+ dataPlacement: placement,
+ className: `${children.props.className || ""} nds-popper-pop-up`,
+ ...eventHandlers
+ },
+ [
+ ...renderInnerChildren(),
+ showArrow && (
+
+ )
+ ]
+ )}
>
)}
diff --git a/components/src/Table/__snapshots__/BaseTable.story.storyshot b/components/src/Table/__snapshots__/BaseTable.story.storyshot
index 68484154e..9e99f3709 100644
--- a/components/src/Table/__snapshots__/BaseTable.story.storyshot
+++ b/components/src/Table/__snapshots__/BaseTable.story.storyshot
@@ -4358,169 +4358,7 @@ exports[`Storyshots Table with a custom cell component 1`] = `
}
- >
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ />
@@ -4991,169 +4829,7 @@ exports[`Storyshots Table with a custom cell component 1`] = `
}
- >
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ />
@@ -5624,169 +5300,7 @@ exports[`Storyshots Table with a custom cell component 1`] = `
}
- >
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ />
@@ -6257,169 +5771,7 @@ exports[`Storyshots Table with a custom cell component 1`] = `
}
- >
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ />
@@ -6890,169 +6242,7 @@ exports[`Storyshots Table with a custom cell component 1`] = `
}
- >
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ />
@@ -7523,169 +6713,7 @@ exports[`Storyshots Table with a custom cell component 1`] = `
}
- >
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ />
@@ -8156,169 +7184,7 @@ exports[`Storyshots Table with a custom cell component 1`] = `
}
- >
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ />
@@ -8789,169 +7655,7 @@ exports[`Storyshots Table with a custom cell component 1`] = `
}
- >
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ />
diff --git a/components/src/Table/__snapshots__/Table.story.storyshot b/components/src/Table/__snapshots__/Table.story.storyshot
index e557c8a7a..d0d2bb0ae 100644
--- a/components/src/Table/__snapshots__/Table.story.storyshot
+++ b/components/src/Table/__snapshots__/Table.story.storyshot
@@ -2156,169 +2156,7 @@ exports[`Storyshots Table with everything 1`] = `
}
- >
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ />
@@ -3159,169 +2997,7 @@ exports[`Storyshots Table with everything 1`] = `
}
- >
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ />
@@ -4162,169 +3838,7 @@ exports[`Storyshots Table with everything 1`] = `
}
- >
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ />
@@ -5177,169 +4691,7 @@ exports[`Storyshots Table with everything 1`] = `
}
- >
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ />
diff --git a/components/src/Tooltip/__snapshots__/Tooltip.story.storyshot b/components/src/Tooltip/__snapshots__/Tooltip.story.storyshot
index 62ed5e00e..ea2b42105 100644
--- a/components/src/Tooltip/__snapshots__/Tooltip.story.storyshot
+++ b/components/src/Tooltip/__snapshots__/Tooltip.story.storyshot
@@ -472,153 +472,7 @@ exports[`Storyshots Tooltip Tooltip 1`] = `
Button
}
- >
-
-
- I
-
- a
- m
-
- a
-
- T
- o
- o
- l
- t
- i
- p
- !
-
-
-
-
-
-
+ />
@@ -1022,7 +876,8 @@ exports[`Storyshots Tooltip open by default 1`] = `
onMouseEnter={[Function]}
onMouseLeave={[Function]}
open={true}
- position={
+ role="tooltip"
+ style={
Object {
"left": 0,
"opacity": 0,
@@ -1031,7 +886,6 @@ exports[`Storyshots Tooltip open by default 1`] = `
"top": 0,
}
}
- role="tooltip"
theme={
Object {
"borders": Array [],
@@ -1120,7 +974,7 @@ exports[`Storyshots Tooltip open by default 1`] = `
}
>
I
@@ -1568,164 +1431,7 @@ exports[`Storyshots Tooltip with Button passed in 1`] = `
Button
}
- >
-
-
-
-
-
-
-
-
-
-
-
-
-
+ />
@@ -2211,238 +1917,7 @@ exports[`Storyshots Tooltip with Link passed in 1`] = `
Button
}
- >
-
-
-
-
+ />
@@ -2834,145 +2309,7 @@ exports[`Storyshots Tooltip with custom hideDelay 1`] = `
Button
}
- >
-
-
- T
- o
- o
- l
- t
- i
- p
-
-
-
-
-
-
+ />
@@ -3466,7 +2803,8 @@ exports[`Storyshots Tooltip with custom maxWidth 1`] = `
onMouseEnter={[Function]}
onMouseLeave={[Function]}
open={true}
- position={
+ role="tooltip"
+ style={
Object {
"left": 0,
"opacity": 0,
@@ -3475,7 +2813,6 @@ exports[`Storyshots Tooltip with custom maxWidth 1`] = `
"top": 0,
}
}
- role="tooltip"
theme={
Object {
"borders": Array [],
@@ -3564,7 +2901,7 @@ exports[`Storyshots Tooltip with custom maxWidth 1`] = `
}
>
I
@@ -4089,145 +3435,7 @@ exports[`Storyshots Tooltip with custom showDelay 1`] = `
Button
}
- >
-
-
- T
- o
- o
- l
- t
- i
- p
-
-
-
-
-
-
+ />
@@ -4619,145 +3827,7 @@ exports[`Storyshots Tooltip with other focusable elements 1`] = `
Button
}
- >
-
-
- T
- o
- o
- l
- t
- i
- p
-
-
-
-
-
-
+ />
@@ -5020,202 +4090,64 @@ exports[`Storyshots Tooltip with other focusable elements 1`] = `
Link
}
+ />
+
+
+
+
+
+
+ Inline Text
+
+ }
+ >
+
+
+
-
-
- T
- o
- o
- l
- t
- i
- p
-
-
-
-
-
-
-
-
-
-
-
-
- Inline Text
-
- }
- >
-
-
-
-
}
- >
-
-
- T
- o
- o
- l
- t
- i
- p
-
-
-
-
-
-
+ />
@@ -5509,176 +4303,30 @@ exports[`Storyshots Tooltip with other focusable elements 1`] = `
"overlay": 1000,
"tabsBar": 210,
"tabsScollIndicator": 200,
- },
- }
- }
- width="200px"
- >
- Box width 200px
-
- }
- >
-
-
-
-
-
- Box width 200px
-
-
-
-
-
-
- Box width 200px
-
+ },
}
+ }
+ width="200px"
+ >
+ Box width 200px
+
+ }
+ >
+
+
+
-
- T
- o
- o
- l
- t
- i
- p
-
-
-
+ Box width 200px
-
-
+
+
+
+
+
+ Box width 200px
+
+ }
+ />
@@ -6052,145 +4708,7 @@ exports[`Storyshots Tooltip with other focusable elements 1`] = `
Box
}
- >
-
-
- T
- o
- o
- l
- t
- i
- p
-
-
-
-
-
-
+ />
@@ -6686,7 +5204,8 @@ exports[`Storyshots Tooltip with placement 1`] = `
onMouseEnter={[Function]}
onMouseLeave={[Function]}
open={true}
- position={
+ role="tooltip"
+ style={
Object {
"left": 0,
"opacity": 0,
@@ -6695,7 +5214,6 @@ exports[`Storyshots Tooltip with placement 1`] = `
"top": 0,
}
}
- role="tooltip"
theme={
Object {
"borders": Array [],
@@ -6784,7 +5302,7 @@ exports[`Storyshots Tooltip with placement 1`] = `
}
>
t
o
@@ -6935,7 +5462,8 @@ exports[`Storyshots Tooltip with placement 1`] = `
onMouseEnter={[Function]}
onMouseLeave={[Function]}
open={true}
- position={
+ role="tooltip"
+ style={
Object {
"left": 0,
"opacity": 0,
@@ -6944,7 +5472,6 @@ exports[`Storyshots Tooltip with placement 1`] = `
"top": 0,
}
}
- role="tooltip"
theme={
Object {
"borders": Array [],
@@ -7033,7 +5560,7 @@ exports[`Storyshots Tooltip with placement 1`] = `
}
>
t
o
@@ -7178,7 +5714,8 @@ exports[`Storyshots Tooltip with placement 1`] = `
onMouseEnter={[Function]}
onMouseLeave={[Function]}
open={true}
- position={
+ role="tooltip"
+ style={
Object {
"left": 0,
"opacity": 0,
@@ -7187,7 +5724,6 @@ exports[`Storyshots Tooltip with placement 1`] = `
"top": 0,
}
}
- role="tooltip"
theme={
Object {
"borders": Array [],
@@ -7276,7 +5812,7 @@ exports[`Storyshots Tooltip with placement 1`] = `
}
>
t
o
@@ -7521,7 +6066,8 @@ exports[`Storyshots Tooltip with placement 1`] = `
onMouseEnter={[Function]}
onMouseLeave={[Function]}
open={true}
- position={
+ role="tooltip"
+ style={
Object {
"left": 0,
"opacity": 0,
@@ -7530,7 +6076,6 @@ exports[`Storyshots Tooltip with placement 1`] = `
"top": 0,
}
}
- role="tooltip"
theme={
Object {
"borders": Array [],
@@ -7619,7 +6164,7 @@ exports[`Storyshots Tooltip with placement 1`] = `
}
>
l
e
@@ -7771,7 +6325,8 @@ exports[`Storyshots Tooltip with placement 1`] = `
onMouseEnter={[Function]}
onMouseLeave={[Function]}
open={true}
- position={
+ role="tooltip"
+ style={
Object {
"left": 0,
"opacity": 0,
@@ -7780,7 +6335,6 @@ exports[`Storyshots Tooltip with placement 1`] = `
"top": 0,
}
}
- role="tooltip"
theme={
Object {
"borders": Array [],
@@ -7869,7 +6423,7 @@ exports[`Storyshots Tooltip with placement 1`] = `
}
>
l
e
@@ -8015,7 +6578,8 @@ exports[`Storyshots Tooltip with placement 1`] = `
onMouseEnter={[Function]}
onMouseLeave={[Function]}
open={true}
- position={
+ role="tooltip"
+ style={
Object {
"left": 0,
"opacity": 0,
@@ -8024,7 +6588,6 @@ exports[`Storyshots Tooltip with placement 1`] = `
"top": 0,
}
}
- role="tooltip"
theme={
Object {
"borders": Array [],
@@ -8113,7 +6676,7 @@ exports[`Storyshots Tooltip with placement 1`] = `
}
>
l
e
@@ -8359,7 +6931,8 @@ exports[`Storyshots Tooltip with placement 1`] = `
onMouseEnter={[Function]}
onMouseLeave={[Function]}
open={true}
- position={
+ role="tooltip"
+ style={
Object {
"left": 0,
"opacity": 0,
@@ -8368,7 +6941,6 @@ exports[`Storyshots Tooltip with placement 1`] = `
"top": 0,
}
}
- role="tooltip"
theme={
Object {
"borders": Array [],
@@ -8457,7 +7029,7 @@ exports[`Storyshots Tooltip with placement 1`] = `
}
>
r
i
@@ -8610,7 +7191,8 @@ exports[`Storyshots Tooltip with placement 1`] = `
onMouseEnter={[Function]}
onMouseLeave={[Function]}
open={true}
- position={
+ role="tooltip"
+ style={
Object {
"left": 0,
"opacity": 0,
@@ -8619,7 +7201,6 @@ exports[`Storyshots Tooltip with placement 1`] = `
"top": 0,
}
}
- role="tooltip"
theme={
Object {
"borders": Array [],
@@ -8708,7 +7289,7 @@ exports[`Storyshots Tooltip with placement 1`] = `
}
>
r
i
@@ -8855,7 +7445,8 @@ exports[`Storyshots Tooltip with placement 1`] = `
onMouseEnter={[Function]}
onMouseLeave={[Function]}
open={true}
- position={
+ role="tooltip"
+ style={
Object {
"left": 0,
"opacity": 0,
@@ -8864,7 +7455,6 @@ exports[`Storyshots Tooltip with placement 1`] = `
"top": 0,
}
}
- role="tooltip"
theme={
Object {
"borders": Array [],
@@ -8953,7 +7543,7 @@ exports[`Storyshots Tooltip with placement 1`] = `
}
>
r
i
@@ -9200,7 +7799,8 @@ exports[`Storyshots Tooltip with placement 1`] = `
onMouseEnter={[Function]}
onMouseLeave={[Function]}
open={true}
- position={
+ role="tooltip"
+ style={
Object {
"left": 0,
"opacity": 0,
@@ -9209,7 +7809,6 @@ exports[`Storyshots Tooltip with placement 1`] = `
"top": 0,
}
}
- role="tooltip"
theme={
Object {
"borders": Array [],
@@ -9298,7 +7897,7 @@ exports[`Storyshots Tooltip with placement 1`] = `
}
>
b
o
@@ -9452,7 +8060,8 @@ exports[`Storyshots Tooltip with placement 1`] = `
onMouseEnter={[Function]}
onMouseLeave={[Function]}
open={true}
- position={
+ role="tooltip"
+ style={
Object {
"left": 0,
"opacity": 0,
@@ -9461,7 +8070,6 @@ exports[`Storyshots Tooltip with placement 1`] = `
"top": 0,
}
}
- role="tooltip"
theme={
Object {
"borders": Array [],
@@ -9550,7 +8158,7 @@ exports[`Storyshots Tooltip with placement 1`] = `
}
>
b
o
@@ -9698,7 +8315,8 @@ exports[`Storyshots Tooltip with placement 1`] = `
onMouseEnter={[Function]}
onMouseLeave={[Function]}
open={true}
- position={
+ role="tooltip"
+ style={
Object {
"left": 0,
"opacity": 0,
@@ -9707,7 +8325,6 @@ exports[`Storyshots Tooltip with placement 1`] = `
"top": 0,
}
}
- role="tooltip"
theme={
Object {
"borders": Array [],
@@ -9796,7 +8413,7 @@ exports[`Storyshots Tooltip with placement 1`] = `
}
>
b
o
@@ -10325,7 +8951,8 @@ exports[`Storyshots Tooltip with wrapped text 1`] = `
onMouseEnter={[Function]}
onMouseLeave={[Function]}
open={true}
- position={
+ role="tooltip"
+ style={
Object {
"left": 0,
"opacity": 0,
@@ -10334,7 +8961,6 @@ exports[`Storyshots Tooltip with wrapped text 1`] = `
"top": 0,
}
}
- role="tooltip"
theme={
Object {
"borders": Array [],
@@ -10423,7 +9049,7 @@ exports[`Storyshots Tooltip with wrapped text 1`] = `
}
>
I