-
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(overlay): add noop trigger strategy (#1133)
- Loading branch information
Showing
8 changed files
with
139 additions
and
10 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
6 changes: 6 additions & 0 deletions
6
src/playground/with-layout/popover/popover-noop.component.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,6 @@ | ||
<input placeholder="Enter your username" nbInput nbPopover="Username is already taken" nbPopoverTrigger="noop"> | ||
|
||
<div> | ||
<button nbButton size="small" status="success" (click)="open()">Open Popover</button> | ||
<button nbButton size="small" status="danger" (click)="close()">Close Popover</button> | ||
</div> |
37 changes: 37 additions & 0 deletions
37
src/playground/with-layout/popover/popover-noop.component.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,37 @@ | ||
/** | ||
* @license | ||
* Copyright Akveo. All Rights Reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*/ | ||
|
||
import { Component, ViewChild } from '@angular/core'; | ||
import { NbPopoverDirective } from '@nebular/theme'; | ||
|
||
|
||
@Component({ | ||
selector: 'nb-popover-noop', | ||
templateUrl: './popover-noop.component.html', | ||
styles: [` | ||
:host { | ||
display: block; | ||
margin: 5rem; | ||
} | ||
button { | ||
margin-right: 1rem; | ||
margin-top: 1rem; | ||
} | ||
`], | ||
}) | ||
export class PopoverNoopComponent { | ||
|
||
@ViewChild(NbPopoverDirective) popover: NbPopoverDirective; | ||
|
||
open() { | ||
this.popover.show(); | ||
} | ||
|
||
close() { | ||
this.popover.hide(); | ||
} | ||
|
||
} |
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