-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7c61265
commit 9a0de00
Showing
5 changed files
with
125 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 changes: 69 additions & 24 deletions
93
packages/nux/src/components/dot-tip/test/__snapshots__/index.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,75 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`DotTip should render correctly 1`] = ` | ||
<Popover | ||
aria-label="Gutenberg tips" | ||
exports[`DotTip should render a button when collapsible 1`] = ` | ||
<button | ||
aria-label="Open tip" | ||
className="nux-dot-tip" | ||
focusOnMount="container" | ||
getAnchorRect={[Function]} | ||
noArrow={true} | ||
onClick={[Function]} | ||
position="middle right" | ||
role="dialog" | ||
/> | ||
`; | ||
|
||
exports[`DotTip should render the tip after being clicked when collapsible 1`] = ` | ||
<button | ||
aria-label="Close tip" | ||
className="nux-dot-tip" | ||
onClick={[Function]} | ||
> | ||
<Popover | ||
aria-label="Gutenberg tips" | ||
className="nux-dot-tip__popover" | ||
focusOnMount="container" | ||
noArrow={true} | ||
onClick={[Function]} | ||
position="middle right" | ||
role="dialog" | ||
> | ||
<p> | ||
It looks like you’re writing a letter. Would you like help? | ||
</p> | ||
<p> | ||
<Button | ||
isLink={true} | ||
> | ||
Dismiss tip | ||
</Button> | ||
</p> | ||
<IconButton | ||
className="nux-dot-tip__disable" | ||
icon="no-alt" | ||
label="Disable tips" | ||
/> | ||
</Popover> | ||
</button> | ||
`; | ||
|
||
exports[`DotTip should render the tip when non-collapsible 1`] = ` | ||
<div | ||
className="nux-dot-tip" | ||
> | ||
<p> | ||
It looks like you’re writing a letter. Would you like help? | ||
</p> | ||
<p> | ||
<Button | ||
isLink={true} | ||
> | ||
Got it | ||
</Button> | ||
</p> | ||
<IconButton | ||
className="nux-dot-tip__disable" | ||
icon="no-alt" | ||
label="Disable tips" | ||
/> | ||
</Popover> | ||
<Popover | ||
aria-label="Gutenberg tips" | ||
className="nux-dot-tip__popover" | ||
focusOnMount="container" | ||
noArrow={true} | ||
onClick={[Function]} | ||
position="middle right" | ||
role="dialog" | ||
> | ||
<p> | ||
It looks like you’re writing a letter. Would you like help? | ||
</p> | ||
<p> | ||
<Button | ||
isLink={true} | ||
> | ||
Dismiss tip | ||
</Button> | ||
</p> | ||
<IconButton | ||
className="nux-dot-tip__disable" | ||
icon="no-alt" | ||
label="Disable tips" | ||
/> | ||
</Popover> | ||
</div> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters