File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed
{{cookiecutter.github_project_name}} Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change
1
+ .custom-widget {
2
+ background-color : blue;
3
+ }
Original file line number Diff line number Diff line change 10
10
],
11
11
"files" : [
12
12
" lib/**/*.js" ,
13
- " dist/*.js"
13
+ " dist/*.js" ,
14
+ " css/*.css"
14
15
],
15
16
"homepage" : " https://github.com/{{ cookiecutter.github_organization_name }}/{{ cookiecutter.github_project_name }}" ,
16
17
"bugs" : {
57
58
"@types/mocha" : " ^5.2.5" ,
58
59
"@types/node" : " ^10.11.6" ,
59
60
"@types/webpack-env" : " ^1.13.6" ,
61
+ "css-loader" : " ^3.2.0" ,
60
62
"expect.js" : " ^0.3.1" ,
61
63
"fs-extra" : " ^7.0.0" ,
62
64
"karma" : " ^3.0.0" ,
71
73
"npm-run-all" : " ^4.1.3" ,
72
74
"rimraf" : " ^2.6.2" ,
73
75
"source-map-loader" : " ^0.2.4" ,
76
+ "style-loader" : " ^1.0.0" ,
74
77
"ts-loader" : " ^5.2.1" ,
75
78
"typescript" : " ~3.1.2" ,
76
79
"webpack" : " ^4.20.2" ,
Original file line number Diff line number Diff line change 9
9
MODULE_NAME , MODULE_VERSION
10
10
} from './version' ;
11
11
12
+ // Import the CSS
13
+ import '../css/widget.css'
14
+
12
15
13
16
export
14
17
class ExampleModel extends DOMWidgetModel {
@@ -41,6 +44,8 @@ class ExampleModel extends DOMWidgetModel {
41
44
export
42
45
class ExampleView extends DOMWidgetView {
43
46
render ( ) {
47
+ this . el . classList . add ( 'custom-widget' ) ;
48
+
44
49
this . value_changed ( ) ;
45
50
this . model . on ( 'change:value' , this . value_changed , this ) ;
46
51
}
You can’t perform that action at this time.
0 commit comments