Skip to content

Commit 5b6f8b5

Browse files
author
esuau
committed
#197 Perform code cleaning
1 parent 22860d1 commit 5b6f8b5

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

src/switch/switch.component.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import { CheckboxComponent } from "../checkbox/checkbox.component";
22
import {
33
ChangeDetectorRef,
44
Component,
5-
Input,
6-
OnInit
5+
Input
76
} from "@angular/core";
87
import { NG_VALUE_ACCESSOR } from "@angular/forms";
98

@@ -83,7 +82,7 @@ export class SwitchChange {
8382
}
8483
]
8584
})
86-
export class SwitchComponent extends CheckboxComponent implements OnInit {
85+
export class SwitchComponent extends CheckboxComponent {
8786
/**
8887
* Variable used for creating unique ids for switch components.
8988
* @type {number}
@@ -116,10 +115,4 @@ export class SwitchComponent extends CheckboxComponent implements OnInit {
116115
super(changeDetectorRef);
117116
SwitchComponent.switchCount++;
118117
}
119-
120-
/**
121-
* Builds variant classes and appends them to the switch and label elements.
122-
* @memberof SwitchComponent
123-
*/
124-
ngOnInit() { }
125118
}

src/switch/switch.stories.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ storiesOf("Switch", module).addDecorator(
1111
.addDecorator(withKnobs)
1212
.add("Basic", () => ({
1313
template: `
14-
<ibm-switch [disabled]="disabled"></ibm-switch>
15-
<ibm-switch [disabled]="disabled" [size]="'sm'"></ibm-switch>
14+
<ibm-switch [disabled]="disabled"></ibm-switch>
15+
<ibm-switch [disabled]="disabled" size="sm"></ibm-switch>
1616
`,
1717
props: {
1818
disabled: boolean("disabled", false)

0 commit comments

Comments
 (0)