Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow renderProp pattern in OverlayTrigger (#5316)
- Loading branch information
Showing
11 changed files
with
107 additions
and
100 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
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
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
This file was deleted.
Oops, something went wrong.
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,15 @@ | ||
const renderTooltip = (props) => ( | ||
<Tooltip id="button-tooltip" {...props}> | ||
Simple tooltip | ||
</Tooltip> | ||
); | ||
|
||
render( | ||
<OverlayTrigger | ||
placement="right" | ||
delay={{ show: 250, hide: 400 }} | ||
overlay={renderTooltip} | ||
> | ||
<Button variant="success">Hover me to see</Button> | ||
</OverlayTrigger>, | ||
); |
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,21 @@ | ||
render( | ||
<OverlayTrigger | ||
placement="bottom" | ||
overlay={<Tooltip id="button-tooltip-2">Check out this avatar</Tooltip>} | ||
> | ||
{({ ref, ...triggerHandler }) => ( | ||
<Button | ||
variant="light" | ||
{...triggerHandler} | ||
className="d-inline-flex align-items-center" | ||
> | ||
<Image | ||
ref={ref} | ||
roundedCircle | ||
src="holder.js/20x20?text=J&bg=28a745&fg=FFF" | ||
/> | ||
<span className="ml-1">Hover to see</span> | ||
</Button> | ||
)} | ||
</OverlayTrigger>, | ||
); |
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
b2bf177
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This transition warning is also present with bootstrap-carousel i guess😅😅