From 657147b5280e1931dab90291bff2c55466296d85 Mon Sep 17 00:00:00 2001 From: Dmitry Nehaychik <4dmitr@gmail.com> Date: Mon, 16 Jul 2018 14:46:07 +0300 Subject: [PATCH] feat(playground): update examples to use the new `nbButton` (#559) --- docs/app/app.module.ts | 2 +- .../components/button/button.component.scss | 1 - .../accordion/accordion-toggle.component.html | 2 +- src/playground/menu/menu-test.component.ts | 8 +-- .../oauth2-password-login.component.ts | 6 +-- .../oauth2/oauth2-login.component.ts | 4 +- src/playground/playground.module.ts | 2 +- .../popover-custom-component.component.html | 2 +- .../popover-custom-component.component.ts | 1 - .../popover/popover-modes.component.html | 6 +-- .../popover/popover-placements.component.html | 12 ++--- .../popover/popover-placements.component.ts | 2 +- .../popover/popover-showcase.component.html | 2 +- .../popover-template-ref.component.html | 2 +- .../popover/popover-test.component.ts | 54 +++++++++---------- .../sidebar/sidebar-fixed.component.html | 2 +- .../sidebar/sidebar-toggle.component.html | 4 +- .../spinner/spinner-button.component.ts | 14 ++--- .../spinner/spinner-card.component.ts | 2 +- .../stepper/stepper-playground.component.scss | 2 +- .../stepper/stepper-showcase.component.html | 16 +++--- .../stepper/stepper-validation.component.html | 12 ++--- .../stepper/stepper-vertical.component.html | 16 +++--- 23 files changed, 86 insertions(+), 88 deletions(-) diff --git a/docs/app/app.module.ts b/docs/app/app.module.ts index b39904e1a2..b6156054aa 100644 --- a/docs/app/app.module.ts +++ b/docs/app/app.module.ts @@ -40,7 +40,7 @@ const docs = require('../output.json'); NbCheckboxModule, NbProgressBarModule, NbMenuModule.forRoot(), - NbThemeModule.forRoot({ name: '' }), + NbThemeModule.forRoot({ name: 'default' }), NgdThemeModule.forRoot(), NbSidebarModule.forRoot(), RouterModule.forRoot(routes, { useHash: false }), diff --git a/src/framework/theme/components/button/button.component.scss b/src/framework/theme/components/button/button.component.scss index e1f3f5f459..699110fdbe 100644 --- a/src/framework/theme/components/button/button.component.scss +++ b/src/framework/theme/components/button/button.component.scss @@ -14,7 +14,6 @@ -moz-appearance: none; text-align: center; text-decoration: none; - margin: 0; display: inline-block; white-space: nowrap; vertical-align: middle; diff --git a/src/playground/accordion/accordion-toggle.component.html b/src/playground/accordion/accordion-toggle.component.html index e4beaed6f3..b258b5b53a 100644 --- a/src/playground/accordion/accordion-toggle.component.html +++ b/src/playground/accordion/accordion-toggle.component.html @@ -1,6 +1,6 @@ - + diff --git a/src/playground/menu/menu-test.component.ts b/src/playground/menu/menu-test.component.ts index c50938aae3..401dd21d12 100644 --- a/src/playground/menu/menu-test.component.ts +++ b/src/playground/menu/menu-test.component.ts @@ -92,16 +92,16 @@ export class NbMenuItem4Component { } - - + + - - + + diff --git a/src/playground/oauth2-password/oauth2-password-login.component.ts b/src/playground/oauth2-password/oauth2-password-login.component.ts index f37428966a..72e24d123e 100644 --- a/src/playground/oauth2-password/oauth2-password-login.component.ts +++ b/src/playground/oauth2-password/oauth2-password-login.component.ts @@ -27,7 +27,7 @@ import { getDeepFromObject } from '../../framework/auth/helpers';

Current User Access Token: {{ token.getValue() | json }}

Current User Access Token Payload : {{getClaims(token.getValue()) | json}}

Current User Refresh Token: {{ token.getRefreshToken() | json }}

- +

No User Authenticated

@@ -71,8 +71,8 @@ import { getDeepFromObject } from '../../framework/auth/helpers'; {{ getConfigValue('forms.validation.password.maxLength') }} characters - diff --git a/src/playground/oauth2/oauth2-login.component.ts b/src/playground/oauth2/oauth2-login.component.ts index dd52d1c537..8451993d3d 100644 --- a/src/playground/oauth2/oauth2-login.component.ts +++ b/src/playground/oauth2/oauth2-login.component.ts @@ -18,8 +18,8 @@ import { takeWhile } from 'rxjs/operators';

Current User Authenticated: {{ !!token }}

Current User Token: {{ token|json }}

- - + + diff --git a/src/playground/playground.module.ts b/src/playground/playground.module.ts index ff042ca4c7..4b877591cc 100644 --- a/src/playground/playground.module.ts +++ b/src/playground/playground.module.ts @@ -29,6 +29,7 @@ import { NbSpinnerModule, NbStepperModule, NbAccordionModule, + NbButtonModule, } from '@nebular/theme'; import { NbPlaygroundRoutingModule } from './playground-routing.module'; @@ -154,7 +155,6 @@ import { NbAccordionMultiComponent } from './accordion/accordion-multi.component import { NbLayoutSidebarSubheaderComponent } from './layout/layout-sidebar-subheader.component'; import { NbLayoutSubheaderComponent } from './layout/layout-subheader.component'; import { NbButtonShowcaseComponent } from './button/button-showcase.component'; -import { NbButtonModule } from '@nebular/theme/components/button/button.module'; import { NbButtonColorsComponent } from './button/button-colors.component'; import { NbButtonShapesComponent } from './button/button-shapes.component'; import { NbButtonHeroComponent } from './button/button-hero.component'; diff --git a/src/playground/popover/popover-custom-component.component.html b/src/playground/popover/popover-custom-component.component.html index 063c52d175..4d1f39175c 100644 --- a/src/playground/popover/popover-custom-component.component.html +++ b/src/playground/popover/popover-custom-component.component.html @@ -1,4 +1,4 @@ - - - diff --git a/src/playground/popover/popover-placements.component.html b/src/playground/popover/popover-placements.component.html index 911d486142..b10495da3b 100644 --- a/src/playground/popover/popover-placements.component.html +++ b/src/playground/popover/popover-placements.component.html @@ -1,23 +1,23 @@ - - - - - - diff --git a/src/playground/popover/popover-placements.component.ts b/src/playground/popover/popover-placements.component.ts index b383eda6f5..dccbbe55bc 100644 --- a/src/playground/popover/popover-placements.component.ts +++ b/src/playground/popover/popover-placements.component.ts @@ -15,7 +15,7 @@ import { Component } from '@angular/core'; margin: 2rem 0; display: block; } - .btn { + button { margin: 1rem; } `], diff --git a/src/playground/popover/popover-showcase.component.html b/src/playground/popover/popover-showcase.component.html index 76fba2a1a0..c09ea1a184 100644 --- a/src/playground/popover/popover-showcase.component.html +++ b/src/playground/popover/popover-showcase.component.html @@ -1 +1 @@ - + diff --git a/src/playground/popover/popover-template-ref.component.html b/src/playground/popover/popover-template-ref.component.html index efb9456d42..4ff5fa3c95 100644 --- a/src/playground/popover/popover-template-ref.component.html +++ b/src/playground/popover/popover-template-ref.component.html @@ -1,4 +1,4 @@ - - - - - - @@ -70,52 +70,52 @@ import { NbDynamicToAddComponent } from '../shared/dynamic.component'; Multiple Hints - - - - - - - - - - - - - - - - @@ -123,13 +123,13 @@ import { NbDynamicToAddComponent } from '../shared/dynamic.component'; Trigger mode - - - @@ -137,7 +137,7 @@ import { NbDynamicToAddComponent } from '../shared/dynamic.component'; Popover - diff --git a/src/playground/sidebar/sidebar-fixed.component.html b/src/playground/sidebar/sidebar-fixed.component.html index 71bcaf46fc..a303ec677e 100644 --- a/src/playground/sidebar/sidebar-fixed.component.html +++ b/src/playground/sidebar/sidebar-fixed.component.html @@ -1,6 +1,6 @@ - + diff --git a/src/playground/sidebar/sidebar-toggle.component.html b/src/playground/sidebar/sidebar-toggle.component.html index 970a54088b..74af6cd860 100644 --- a/src/playground/sidebar/sidebar-toggle.component.html +++ b/src/playground/sidebar/sidebar-toggle.component.html @@ -1,7 +1,7 @@ - - + + diff --git a/src/playground/spinner/spinner-button.component.ts b/src/playground/spinner/spinner-button.component.ts index af624315c1..d11e2472f0 100644 --- a/src/playground/spinner/spinner-button.component.ts +++ b/src/playground/spinner/spinner-button.component.ts @@ -12,32 +12,32 @@ import { Component } from '@angular/core';
- - - - - - @@ -46,7 +46,7 @@ import { Component } from '@angular/core'; `, styles: [` - :host .button-container { + button { margin: 1rem; } `], diff --git a/src/playground/spinner/spinner-card.component.ts b/src/playground/spinner/spinner-card.component.ts index 953ee1c853..bd8627b948 100644 --- a/src/playground/spinner/spinner-card.component.ts +++ b/src/playground/spinner/spinner-card.component.ts @@ -10,7 +10,7 @@ import { Component } from '@angular/core'; A nebula is an interstellar cloud of dust, hydrogen, helium and other ionized gases. Originally, nebula was a name for any diffuse astronomical object.

- + diff --git a/src/playground/stepper/stepper-playground.component.scss b/src/playground/stepper/stepper-playground.component.scss index bd6bd8a66c..e8ce011725 100644 --- a/src/playground/stepper/stepper-playground.component.scss +++ b/src/playground/stepper/stepper-playground.component.scss @@ -1,6 +1,6 @@ :host ::ng-deep nb-stepper .step-content { text-align: center; - .btn { + button { cursor: pointer; margin: 0.5rem; } diff --git a/src/playground/stepper/stepper-showcase.component.html b/src/playground/stepper/stepper-showcase.component.html index a590ed4919..0ca3277053 100644 --- a/src/playground/stepper/stepper-showcase.component.html +++ b/src/playground/stepper/stepper-showcase.component.html @@ -4,25 +4,25 @@ First step

Step content #1

- - + +
Second step

Step content #2

- - + +

Step content #3

- - + +
Fourth step

Step content #4

- - + +
diff --git a/src/playground/stepper/stepper-validation.component.html b/src/playground/stepper/stepper-validation.component.html index ef3b76d138..19dc036351 100644 --- a/src/playground/stepper/stepper-validation.component.html +++ b/src/playground/stepper/stepper-validation.component.html @@ -11,7 +11,7 @@
- + @@ -25,8 +25,8 @@ - - + + @@ -38,14 +38,14 @@ - - + +

Wizard completed!

- +
diff --git a/src/playground/stepper/stepper-vertical.component.html b/src/playground/stepper/stepper-vertical.component.html index 41a79a0830..b7101926d3 100644 --- a/src/playground/stepper/stepper-vertical.component.html +++ b/src/playground/stepper/stepper-vertical.component.html @@ -14,8 +14,8 @@

Step content #1

sed ornare magna. Mauris vitae laoreet diam. Mauris fermentum ligula at lacinia semper. Nulla placerat dui eu sapien pellentesque, eu placerat leo luctus. Cras pharetra blandit fermentum.

- - + +

Step content #2

@@ -30,8 +30,8 @@

Step content #2

sed ornare magna. Mauris vitae laoreet diam. Mauris fermentum ligula at lacinia semper. Nulla placerat dui eu sapien pellentesque, eu placerat leo luctus. Cras pharetra blandit fermentum.

- - + +

Step content #3

@@ -46,8 +46,8 @@

Step content #3

sed ornare magna. Mauris vitae laoreet diam. Mauris fermentum ligula at lacinia semper. Nulla placerat dui eu sapien pellentesque, eu placerat leo luctus. Cras pharetra blandit fermentum.

- - + +

Step content #4

@@ -62,8 +62,8 @@

Step content #4

sed ornare magna. Mauris vitae laoreet diam. Mauris fermentum ligula at lacinia semper. Nulla placerat dui eu sapien pellentesque, eu placerat leo luctus. Cras pharetra blandit fermentum.

- - + +