Skip to content

Commit cdb776c

Browse files
committed
remove styles from components
1 parent ef77164 commit cdb776c

19 files changed

+33
-59
lines changed

.storybook/config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
import { configure } from "@storybook/angular";
22

3+
// load global styles
4+
require("!style-loader!css-loader!sass-loader!./preview.scss");
5+
36
require("../src/index.stories");
47
// automatically import all files ending in *.stories.ts
58
const req = require.context("../src", true, /.stories.ts$/);
69
function loadStories() {
10+
711
req.keys().forEach(filename => {
812
if (!filename.includes("index")) { req(filename) }
913
});

.storybook/notwebpack.config.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

.storybook/preview.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@import "~carbon-components/scss/globals/scss/styles.scss";
2+
3+
body {
4+
margin: 20px;
5+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
"rxjs": "6.2.2",
102102
"sass-loader": "7.0.1",
103103
"semantic-release": "^15.9.3",
104-
"style-loader": "0.21.0",
104+
"style-loader": "^0.21.0",
105105
"stylelint": "8.4.0",
106106
"stylelint-webpack-plugin": "0.10.4",
107107
"svgxuse": "1.2.6",

src/dropdown/dropdown.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ import { position } from "../utils/position";
7474
useExisting: Dropdown,
7575
multi: true
7676
}
77-
],
78-
styleUrls: [ "./dropdown.scss" ]
77+
]
7978
})
8079
export class Dropdown implements OnInit, AfterContentInit, OnDestroy {
8180
/**

src/dropdown/dropdown.scss

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/dropdown/list/dropdown-list.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ import { ScrollableList } from "./../scrollable-list.directive";
8888
provide: AbstractDropdownView,
8989
useExisting: DropdownList
9090
}
91-
],
92-
styleUrls: ["./dropdown-list.scss"]
91+
]
9392
}) // conceptually this extends list-group, but we dont have to
9493
export class DropdownList implements AbstractDropdownView, AfterViewInit, OnChanges, OnDestroy {
9594
/**

src/dropdown/list/dropdown-list.scss

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/forms/checkbox.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@ export class CheckboxChange {
8383
multi: true
8484
}
8585
],
86-
changeDetection: ChangeDetectionStrategy.OnPush,
87-
styleUrls: [ "./../../node_modules/carbon-components/scss/components/checkbox/_checkbox.scss" ]
86+
changeDetection: ChangeDetectionStrategy.OnPush
8887
})
8988
export class CheckboxComponent implements ControlValueAccessor, AfterViewInit {
9089
/**

src/forms/forms.stories.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ storiesOf("Forms", module).addDecorator(
4343
Some Title
4444
<input type="text" class="bx--text-input" placeholder="Optional placeholder text">
4545
</ibm-label>
46-
`,
47-
styleUrls: ["./../../node_modules/carbon-components/scss/components/text-input/_text-input.scss"]
46+
`
4847
}))
4948
.add("Switch", () => ({
5049
template: `<ibm-switch></ibm-switch>`

0 commit comments

Comments
 (0)