-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tooltip): add container input, support 'body'
- Loading branch information
1 parent
84d555c
commit b8230e5
Showing
8 changed files
with
76 additions
and
2 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
demo/src/app/components/tooltip/demos/container/tooltip-container.html
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,16 @@ | ||
<p> | ||
Set the <code>container</code> property to "body" to have the tooltip be appended to the body instead of the triggering element's parent. This option is useful if the element triggering the tooltip is inside an element that clips its contents (i.e. <code>overflow: hidden</code>). | ||
</p> | ||
|
||
<div class='row'> | ||
<div class='card'> | ||
<button type="button" class="btn btn-secondary" | ||
ngbTooltip="Vivamus sagittis lacus vel augue laoreet rutrum faucibus."> | ||
Default tooltip | ||
</button> | ||
<button type="button" class="btn btn-secondary" | ||
ngbTooltip="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." container="body"> | ||
Tooltip appended to body | ||
</button> | ||
</div> | ||
</div> |
9 changes: 9 additions & 0 deletions
9
demo/src/app/components/tooltip/demos/container/tooltip-container.ts
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,9 @@ | ||
import {Component} from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'ngbd-tooltip-container', | ||
templateUrl: './tooltip-container.html', | ||
styles: ['.card { padding: 50px 0; text-align: center; overflow:hidden }'] | ||
}) | ||
export class NgbdTooltipContainer { | ||
} |
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