Skip to content

Commit

Permalink
docs: 4.0 fixes (#1465)
Browse files Browse the repository at this point in the history
  • Loading branch information
yggg committed May 27, 2019
1 parent f722a48 commit 46a022c
Show file tree
Hide file tree
Showing 32 changed files with 89 additions and 152 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@

@include media-breakpoint-up(md) {
.components-list {
margin: 0 -1.5rem;

.component-card-wrapper {
flex: 1 0 auto;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
// colors
$action-bg: white;
$action-fg: nb-theme(color-fg-heading-light);
$block-bg-default: #ebeff5;
$block-bg-cosmic: #2f296b;
$block-fg-cosmic: #7d838b;
$block-bg-corporate: #f1f5f8;
$block-bg-default: #f7f8fa;
$block-bg-cosmic: #292766;
$block-bg-corporate: #f7f8fa;
$block-fg-cosmic: #e8e9fa;

display: flex;
flex-direction: column;
Expand Down
2 changes: 1 addition & 1 deletion docs/app/home/home.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</div>
<svg class="concave" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1920 222" preserveAspectRatio="xMidYMin slice">
<g>
<path fill="#fff" d="M1920,0c-248.44,93.45-587.33,151.09-960.52,151.09S248.44,93.45,0,0V222H1920Z"/>
<path d="M1920,0c-248.44,93.45-587.33,151.09-960.52,151.09S248.44,93.45,0,0V222H1920Z"/>
</g>
</svg>
</section>
Expand Down
1 change: 1 addition & 0 deletions docs/app/home/home.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
margin-top: -5rem;
margin-left: -20%;
margin-right: -20%;
fill: nb-theme(layout-background-color);

@include media-breakpoint-up(md) {
margin-top: -7rem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ import { Component, Input } from '@angular/core';
import { NbDialogRef } from '@nebular/theme';

@Component({
selector: 'nb-dialog',
template: `
<nb-card [style.width.px]="600" [style.height.px]="500">
<nb-card class="dialog-card">
<nb-card-header>{{ title }}</nb-card-header>
<nb-card-body>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras convallis tincidunt tincidunt.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ import { Component, Input } from '@angular/core';
import { NbDialogRef } from '@nebular/theme';

@Component({
selector: 'nb-dialog',
template: `
<nb-card [style.width.px]="600" [style.height.px]="500">
<nb-card class="dialog-card">
<nb-card-header>{{ title }}</nb-card-header>
<nb-card-body>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras convallis tincidunt tincidunt.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ import { Component, Input } from '@angular/core';
import { NbDialogRef } from '@nebular/theme';

@Component({
selector: 'nb-dialog',
template: `
<nb-card [style.width.px]="600" [style.height.px]="500">
<nb-card class="dialog-card">
<nb-card-header>{{ title }}</nb-card-header>
<nb-card-body>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras convallis tincidunt tincidunt.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ import { Component, Input } from '@angular/core';
import { NbDialogRef } from '@nebular/theme';

@Component({
selector: 'nb-dialog',
template: `
<nb-card [style.width.px]="600" [style.height.px]="500">
<nb-card class="dialog-card">
<nb-card-header>{{ title }}</nb-card-header>
<nb-card-body>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras convallis tincidunt tincidunt.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ import { NbDialogRef } from '@nebular/theme';
</nb-card-footer>
</nb-card>
`,
styles: [`
button {
margin: 1rem;
}
`],
})
export class DialogNamePromptComponent {
constructor(protected dialogRef: NbDialogRef<DialogNamePromptComponent>) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ import { Component, Input } from '@angular/core';
import { NbDialogRef } from '@nebular/theme';

@Component({
selector: 'nb-dialog',
template: `
<nb-card [style.width.px]="600" [style.height.px]="500">
<nb-card class="dialog-card">
<nb-card-header>{{ title }}</nb-card-header>
<nb-card-body>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras convallis tincidunt tincidunt.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ import { Component, Input } from '@angular/core';
import { NbDialogRef } from '@nebular/theme';

@Component({
selector: 'nb-dialog',
template: `
<nb-card [style.width.px]="600" [style.height.px]="500">
<nb-card class="dialog-card">
<nb-card-header>{{ title }}</nb-card-header>
<nb-card-body>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras convallis tincidunt tincidunt.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,7 @@ import { AutoFocusDialogComponent } from './components/auto-focus-dialog.compone
<button nbButton hero (click)="openWithoutAutoFocus()">Open without auto focus</button>
</div>
`,
styles: [`
/deep/ nb-layout-column {
height: 80vw;
}
button {
margin: 1rem;
}
`],
styleUrls: ['./dialog-common.scss'],
})
export class DialogAutoFocusComponent {
constructor(private dialogService: NbDialogService) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,7 @@ import { BackdropClickDialogComponent } from './components/backdrop-click-dialog
<button nbButton hero (click)="openWithoutBackdropClick()">Open without backdrop click close</button>
</div>
`,
styles: [`
/deep/ nb-layout-column {
height: 80vw;
}
button {
margin: 1rem;
}
`],
styleUrls: ['./dialog-common.scss'],
})
export class DialogBackdropClickComponent {
constructor(private dialogService: NbDialogService) {
Expand Down
21 changes: 21 additions & 0 deletions src/playground/with-layout/dialog/dialog-common.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/deep/ {
nb-layout-column {
height: 80vw;
}

button + button {
margin-left: 1rem;
}

.dialog-card {
margin-left: auto;
margin-right: auto;
width: 90%;
}

@media (min-width: 40rem) {
.dialog-card {
width: 38rem;
}
}
}
10 changes: 1 addition & 9 deletions src/playground/with-layout/dialog/dialog-esc.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,7 @@ import { EscDialogComponent } from './components/esc-dialog.component';
<button nbButton hero (click)="openWithoutEscClose()">Open without escape close</button>
</div>
`,
styles: [`
/deep/ nb-layout-column {
height: 80vw;
}
button {
margin: 1rem;
}
`],
styleUrls: ['./dialog-common.scss'],
})
export class DialogEscComponent {
constructor(private dialogService: NbDialogService) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,7 @@ import { HasBackdropDialogComponent } from './components/has-backdrop-dialog.com
<button nbButton hero (click)="openWithoutBackdrop()">Open without backdrop</button>
</div>
`,
styles: [`
/deep/ nb-layout-column {
height: 80vw;
}
button {
margin: 1rem;
}
`],
styleUrls: ['./dialog-common.scss'],
})
export class DialogHasBackdropComponent {
constructor(private dialogService: NbDialogService) {
Expand Down
6 changes: 1 addition & 5 deletions src/playground/with-layout/dialog/dialog-result.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ import { DialogNamePromptComponent } from './components/name-prompt-dialog.compo
<li *ngFor="let name of names">{{ name }}</li>
</ul>
`,
styles: [`
/deep/ nb-layout-column {
height: 80vw;
}
`],
styleUrls: ['./dialog-common.scss'],
})
export class DialogResultComponent {
names: string[] = [];
Expand Down
10 changes: 1 addition & 9 deletions src/playground/with-layout/dialog/dialog-scroll.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,7 @@ import { ScrollDialogComponent } from './components/scroll-dialog.component';
<button nbButton hero (click)="openWithoutScroll()">Open without scroll</button>
</div>
`,
styles: [`
/deep/ nb-layout-column {
height: 80vw;
}
button {
margin: 1rem;
}
`],
styleUrls: ['./dialog-common.scss'],
})
export class DialogScrollComponent {
constructor(private dialogService: NbDialogService) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ import { ShowcaseDialogComponent } from './components/showcase-dialog.component'
@Component({
selector: 'nb-dialog-showcase',
template: '<button nbButton (click)="open()">Open Dialog</button>',
styles: [` /deep/ nb-layout-column {
height: 80vw;
} `],
styleUrls: ['./dialog-common.scss'],
})
export class DialogShowcaseComponent {
constructor(private dialogService: NbDialogService) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ import { NbDialogService } from '@nebular/theme';
</ng-template>
<button nbButton (click)="open(dialog)">Open Dialog</button>
`,
styles: [`
/deep/ nb-layout-column {
height: 80vw;
}
`],
styleUrls: ['./dialog-common.scss'],
})
export class DialogTemplateComponent {
constructor(private dialogService: NbDialogService) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ import { DynamicToAddComponent } from './components/dynamic.components';
styles: [`
:host {
display: block;
margin: 5rem;
padding-bottom: 3rem;
}
::ng-deep nb-popover {
padding: 1rem;
}
`],
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,7 @@ import { NbPopoverDirective } from '@nebular/theme';
@Component({
selector: 'nb-popover-dynamic-code',
templateUrl: './popover-dynamic-code.component.html',
styles: [`
:host {
display: flex;
flex-direction: column;
}
.margin-bottom-0 {
margin-bottom: 0;
}
.section {
margin-bottom: 2rem;
}
.popover-container {
display: flex;
justify-content: center;
padding: 12rem;
}
button {
margin-right: 1rem;
margin-top: 1rem;
}
`],
styleUrls: ['./popover-dynamic.scss'],
})
export class PopoverDynamicCodeComponent implements OnDestroy, AfterViewInit {

Expand Down
22 changes: 1 addition & 21 deletions src/playground/with-layout/popover/popover-dynamic.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,7 @@ import { PopoverListComponent, PopoverTabsComponent } from './components/dynamic
@Component({
selector: 'nb-popover-dynamic',
templateUrl: './popover-dynamic.component.html',
styles: [`
:host {
display: flex;
flex-direction: column;
}
.margin-bottom-0 {
margin-bottom: 0;
}
.section {
margin-bottom: 2rem;
}
.popover-container {
display: flex;
justify-content: center;
padding: 12rem;
}
button {
margin-right: 1rem;
margin-top: 1rem;
}
`],
styleUrls: ['./popover-dynamic.scss'],
})
export class PopoverDynamicComponent implements OnDestroy, AfterViewInit {

Expand Down
23 changes: 23 additions & 0 deletions src/playground/with-layout/popover/popover-dynamic.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
:host {
display: flex;
flex-direction: column;
}
.margin-bottom-0 {
margin-bottom: 0;
}
.section {
margin-bottom: 2rem;
}
.popover-container {
display: flex;
justify-content: center;
padding: 12rem;
}
button {
margin-right: 1rem;
margin-top: 1rem;
}

::ng-deep nb-popover nb-card {
box-shadow: none !important;
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<div class="btn-group btn-divided-group btn-outline-divided-group">
<button nbButton outline nbPopover="Click Mode" nbPopoverTrigger="click">
<button nbButton outline nbPopover="Click Mode" nbPopoverTrigger="click" nbPopoverPlacement="bottom">
Click Mode
</button>

<button nbButton outline nbPopover="Hint Mode" nbPopoverTrigger="hint">
<button nbButton outline nbPopover="Hint Mode" nbPopoverTrigger="hint" nbPopoverPlacement="bottom">
Hint Mode
</button>

<button nbButton outline nbPopover="Hover Mode" nbPopoverTrigger="hover">
<button nbButton outline nbPopover="Hover Mode" nbPopoverTrigger="hover" nbPopoverPlacement="bottom">
Hover Mode
</button>
</div>
7 changes: 3 additions & 4 deletions src/playground/with-layout/popover/popover-modes.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@

import { Component } from '@angular/core';


@Component({
selector: 'nb-popover-modes',
templateUrl: './popover-modes.component.html',
styles: [`
:host {
display: block;
margin: 5rem;
padding-bottom: 5rem;
}
button {
margin: 0.5rem;
button + button {
margin-left: 1rem;
}
`],
})
Expand Down
Loading

0 comments on commit 46a022c

Please sign in to comment.