Skip to content
This repository was archived by the owner on Oct 1, 2018. It is now read-only.

Commit 257aafd

Browse files
Merge branch 'master' into fix-readme
2 parents 9030193 + 9c532b5 commit 257aafd

File tree

3 files changed

+40
-16
lines changed

3 files changed

+40
-16
lines changed
Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1+
.extra-tip {
2+
display: flex;
3+
}
4+
15
h3 {
2-
display: inline-block;
3-
vertical-align: middle;
4-
padding-left: 10px;
6+
display: inline-block;
7+
vertical-align: middle;
8+
padding-left: 10px;
59
}
610

711
.tip-warning {
8-
color: rgb(244, 67, 54);
12+
color: rgb(244, 67, 54);
913
}
1014

1115
.tip-info {
12-
color: rgb(33, 150, 243);
16+
color: rgb(33, 150, 243);
1317
}

src/app/operators/components/operator/operator.component.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,18 @@ <h3 class="short-description" [innerHTML]="shortDescription"></h3>
2121
[operatorExamples]="examples" class="margin-bottom-16">
2222
</app-operator-examples>
2323
<app-operator-parameters
24-
[operatorParameters]="parameters">
24+
[operatorParameters]="parameters"
25+
*ngIf="parameters?.length">
2526
</app-operator-parameters>
2627
<app-operator-walkthrough
2728
class="margin-bottom-16"
2829
[operatorWalkthrough]="walkthrough" >
2930
</app-operator-walkthrough>
31+
<app-operator-extras
32+
class="margin-bottom-16"
33+
*ngIf="walkthroughExtras"
34+
[operatorExtras]="walkthroughExtras">
35+
</app-operator-extras>
3036
<app-related-operators
3137
[relatedOperators]="relatedOperators">
3238
</app-related-operators>

src/app/operators/components/operator/operator.component.ts

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
1-
import { Component, Input, OnInit, ChangeDetectionStrategy } from '@angular/core';
2-
import { OperatorDoc } from '../../../../operator-docs/operator.model';
1+
import {
2+
Component,
3+
Input,
4+
OnInit,
5+
ChangeDetectionStrategy
6+
} from "@angular/core";
7+
import { OperatorDoc } from "../../../../operator-docs/operator.model";
38

49
@Component({
5-
selector: 'app-operator',
6-
templateUrl: './operator.component.html',
7-
styleUrls: ['./operator.component.scss'],
10+
selector: "app-operator",
11+
templateUrl: "./operator.component.html",
12+
styleUrls: ["./operator.component.scss"],
813
changeDetection: ChangeDetectionStrategy.OnPush
914
})
1015
export class OperatorComponent {
1116
@Input() operator: OperatorDoc;
1217

13-
private readonly baseSourceUrl = 'https://github.com/ReactiveX/rxjs/blob/master/src/operators/';
14-
private readonly baseSpecUrl = 'http://reactivex.io/rxjs/test-file/spec-js/operators';
18+
private readonly baseSourceUrl = "https://github.com/ReactiveX/rxjs/blob/master/src/operators/";
19+
private readonly baseSpecUrl = "http://reactivex.io/rxjs/test-file/spec-js/operators";
1520

1621
get operatorName() {
1722
return this.operator.name;
1823
}
1924

2025
get signature() {
21-
return this.operator.signature || 'Signature Placeholder';
26+
return this.operator.signature || "Signature Placeholder";
2227
}
2328

2429
get marbleUrl() {
@@ -30,17 +35,26 @@ export class OperatorComponent {
3035
}
3136

3237
get shortDescription() {
33-
return this.operator.shortDescription && this.operator.shortDescription.description;
38+
return (
39+
this.operator.shortDescription &&
40+
this.operator.shortDescription.description
41+
);
3442
}
3543

3644
get shortDescriptionExtras() {
37-
return this.operator.shortDescription && this.operator.shortDescription.extras;
45+
return (
46+
this.operator.shortDescription && this.operator.shortDescription.extras
47+
);
3848
}
3949

4050
get walkthrough() {
4151
return this.operator.walkthrough && this.operator.walkthrough.description;
4252
}
4353

54+
get walkthroughExtras() {
55+
return this.operator.walkthrough && this.operator.walkthrough.extras;
56+
}
57+
4458
get parameters() {
4559
return this.operator.parameters || [];
4660
}

0 commit comments

Comments
 (0)