Skip to content

Commit

Permalink
fix(docs): live example height on theme change
Browse files Browse the repository at this point in the history
  • Loading branch information
nnixaa committed Jun 20, 2018
1 parent 09d71c9 commit 57aae1a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
</tr>
</thead>
<tbody>
<tr *ngFor="let method of methods">
<ng-container *ngIf="method.shortDescription || method.description">
<ng-container *ngFor="let method of methods">
<tr *ngIf="method.shortDescription || method.description">
<td>{{ method.name }}() <br><i *ngIf="method.isStatic">static method</i></td>
<td>
<div class="method-signature">
Expand All @@ -36,8 +36,8 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
{{ method.shortDescription }} <br> {{ method.description }}
</div>
</td>
</ng-container>
</tr>
</tr>
</ng-container>
</tbody>
</table>
`,
Expand Down
7 changes: 5 additions & 2 deletions docs/app/documentation/page/page.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,18 @@
}

tr {
border-bottom: 1px solid $table-border;
border-bottom: $table-border;

&:last-child {
border: none;
}
p {
margin-bottom: 0;
}
}

td {
padding: 0.5rem;
padding: 1rem 0.5rem;

&:first-child {
font-weight: 500;
Expand Down
1 change: 1 addition & 0 deletions docs/app/example/example.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export class NgdExampleComponent implements OnInit, AfterViewInit, OnDestroy {

private changeTheme(payload) {
this.themeService.changeTheme(payload.theme);
this.sendHeight(); // theme change may cause change of height
}

private getId(): string {
Expand Down

0 comments on commit 57aae1a

Please sign in to comment.