-
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(popover): add support for the 'container' option
- Loading branch information
1 parent
e86277f
commit d1a22c0
Showing
8 changed files
with
81 additions
and
2 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
demo/src/app/components/popover/demos/container/popover-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 popover be appended to the body instead of the triggering element's parent. This option is useful if the element triggering the popover 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" | ||
ngbPopover="Vivamus sagittis lacus vel augue laoreet rutrum faucibus."> | ||
Default popover | ||
</button> | ||
<button type="button" class="btn btn-secondary" | ||
ngbPopover="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." container="body"> | ||
Popover appended to body | ||
</button> | ||
</div> | ||
</div> |
9 changes: 9 additions & 0 deletions
9
demo/src/app/components/popover/demos/container/popover-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-popover-container', | ||
templateUrl: './popover-container.html', | ||
styles: ['.card { padding: 50px 0; text-align: center; overflow:hidden }'] | ||
}) | ||
export class NgbdPopoverContainer { | ||
} |
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