Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(popover): add popover showcase #1556

Merged
merged 2 commits into from
Feb 22, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
feat(popover): component popover demo
  • Loading branch information
nnixaa committed Feb 22, 2018
commit e65f1d87e5c62b444f842f94ff07385eff230998
26 changes: 20 additions & 6 deletions src/app/pages/ui-features/popovers/popovers.component.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="row">
<div class="col-lg-4">
<nb-card>
<div class="col-lg-6">
<nb-card size="small">
<nb-card-header>Popover Position</nb-card-header>
<nb-card-body>
<p>When popover has not enough space based on the configured placement, it will adjust accordingly trying to fit the screen.</p>
Expand All @@ -12,8 +12,8 @@
</nb-card>
</div>

<div class="col-lg-4">
<nb-card>
<div class="col-lg-6">
<nb-card size="small">
<nb-card-header>Simple Popovers</nb-card-header>
<nb-card-body>
<p>In a simples form popover can take a string of text to render.</p>
Expand All @@ -23,8 +23,10 @@
</nb-card-body>
</nb-card>
</div>
</div>

<div class="col-lg-4">
<div class="row">
<div class="col-lg-6">

<ng-template #tabs>
<nb-tabset>
Expand Down Expand Up @@ -70,7 +72,7 @@
</nb-card>
</ng-template>

<nb-card>
<nb-card size="small">
<nb-card-header>Template Popovers</nb-card-header>
<nb-card-body>
<p>You can pass a refference to `ng-template` to be rendered.</p>
Expand All @@ -80,6 +82,18 @@
</nb-card-body>
</nb-card>
</div>

<div class="col-lg-6">
<nb-card size="small">
<nb-card-header>Component Popovers</nb-card-header>
<nb-card-body>
<p>Same way popover can render any angular compnoent.</p>
<button class="btn btn-warning with-margins" [nbPopover]="tabsComponent">With tabs</button>
<button class="btn btn-warning with-margins" [nbPopover]="formComponent">With form</button>
<button class="btn btn-warning with-margins" [nbPopover]="cardComponent">With card</button>
</nb-card-body>
</nb-card>
</div>
</div>

<div class="row">
Expand Down
7 changes: 5 additions & 2 deletions src/app/pages/ui-features/popovers/popovers.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { Component } from '@angular/core';
import { NgxPopoverCardComponent, NgxPopoverTabsComponent } from './popover-examples.component';
import {
NgxPopoverCardComponent, NgxPopoverFormComponent,
NgxPopoverTabsComponent,
} from './popover-examples.component';

@Component({
selector: 'ngx-popovers',
Expand All @@ -9,5 +12,5 @@ import { NgxPopoverCardComponent, NgxPopoverTabsComponent } from './popover-exam
export class PopoversComponent {
tabsComponent = NgxPopoverTabsComponent;
cardComponent = NgxPopoverCardComponent;
formComponent = NgxPopoverCardComponent;
formComponent = NgxPopoverFormComponent;
}