-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docs(web-twig): Add demo with Tooltip on Icon cmp
- New demo with tooltip on Icon component
- Loading branch information
1 parent
84b227d
commit a3e338c
Showing
2 changed files
with
28 additions
and
0 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
24 changes: 24 additions & 0 deletions
24
packages/web-twig/src/Resources/components/Tooltip/stories/TooltipIcon.twig
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<span> | ||
Click on the icon on the right to view the tooltip | ||
<TooltipWrapper UNSAFE_className="spirit-feature-tooltip-enable-data-placement d-inline-block"> | ||
<Icon | ||
id="button-example-with-icon" | ||
name="info" | ||
boxSize="16" | ||
marginBottom="space-200" | ||
aria-describedby="tooltip-example-with-icon" | ||
data-spirit-toggle="tooltip" | ||
data-spirit-target="#tooltip-example-with-icon" | ||
/> | ||
<TooltipPopover | ||
id="tooltip-example-with-icon" | ||
UNSAFE_className="is-hidden" | ||
enableControlledPlacement | ||
placement="right" | ||
flipFallbackPlacements="top-start, top-bottom, left" | ||
isDismissible | ||
> | ||
Close me | ||
</TooltipPopov> | ||
</TooltipWrapper> | ||
</span> |