This repository was archived by the owner on Sep 28, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 10 files changed +86
-43
lines changed Expand file tree Collapse file tree 10 files changed +86
-43
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"private" : true ,
3
3
"devDependencies" : {
4
- "babel-core" : " ^5.8.22 " ,
4
+ "babel-core" : " ^5.8.25 " ,
5
5
"babel-loader" : " ^5.3.2" ,
6
- "css-loader" : " ^0.16 .0" ,
6
+ "css-loader" : " ^0.19 .0" ,
7
7
"extract-text-webpack-plugin" : " ^0.8.2" ,
8
- "style-loader" : " ^0.12.3 " ,
9
- "webpack" : " ^1.12.0 "
8
+ "style-loader" : " ^0.12.4 " ,
9
+ "webpack" : " ^1.12.2 "
10
10
},
11
11
"dependencies" : {
12
- "react" : " ^0.14.0-beta3 " ,
13
- "react-css-modules" : " ^3.0 .1" ,
14
- "react-dom" : " ^0.14.0-beta3 "
12
+ "react" : " ^0.14.0-rc1 " ,
13
+ "react-css-modules" : " ^3.5 .1" ,
14
+ "react-dom" : " ^0.14.0-rc1 "
15
15
}
16
16
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
- import styles from './car.css' ;
3
2
import CSSModules from 'react-css-modules' ;
3
+ import styles from './../table.css' ;
4
4
5
5
@CSSModules ( styles )
6
6
export default class extends React . Component {
7
7
render ( ) {
8
- return < div styleName = 'car' >
9
- < div styleName = 'front-door' > front-door</ div >
10
- < div styleName = 'back-door' > back-door</ div >
8
+ return < div styleName = 'table' >
9
+ < div styleName = 'row' >
10
+ < div styleName = 'cell' > A0</ div >
11
+ < div styleName = 'cell' > B0</ div >
12
+ </ div >
11
13
</ div > ;
12
14
}
13
15
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
- import styles from './car.css' ;
3
2
import CSSModules from 'react-css-modules' ;
3
+ import styles from './../table.css' ;
4
4
5
- class Car extends React . Component {
5
+ class Table extends React . Component {
6
6
render ( ) {
7
- return < div styleName = 'car' >
8
- < div styleName = 'front-door' > front-door</ div >
9
- < div styleName = 'back-door' > back-door</ div >
7
+ return < div styleName = 'table' >
8
+ < div styleName = 'row' >
9
+ < div styleName = 'cell' > A0</ div >
10
+ < div styleName = 'cell' > B0</ div >
11
+ </ div >
10
12
</ div > ;
11
13
}
12
14
}
13
15
14
- export default CSSModules ( Car , styles ) ;
16
+ export default CSSModules ( Table , styles ) ;
Original file line number Diff line number Diff line change
1
+ .table {
2
+ composes : table from './../table.css' ;
3
+ }
4
+
5
+ .row {
6
+ composes : row from './../table.css' ;
7
+ }
8
+
9
+ /* .cell {
10
+ composes: cell from './table.css';
11
+ } */
12
+
13
+ .table {
14
+ width : 400px ;
15
+ }
16
+
17
+ .cell {
18
+ float : left; width : 154px ; background : # eee ; padding : 10px ; margin : 10px 0 10px 10px ;
19
+ }
Original file line number Diff line number Diff line change
1
+ import React from 'react' ;
2
+ import CSSModules from 'react-css-modules' ;
3
+ import styles from './../table.css' ;
4
+
5
+ class Table extends React . Component {
6
+ render ( ) {
7
+ return < div styleName = 'table' >
8
+ < div styleName = 'row' >
9
+ < div styleName = 'cell' > A0</ div >
10
+ < div styleName = 'cell' > B0</ div >
11
+ </ div >
12
+ </ div > ;
13
+ }
14
+ }
15
+
16
+ export default CSSModules ( Table , styles ) ;
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
import ReactDOM from 'react-dom' ;
3
- import UsingstyleName from './UsingstyleName' ;
3
+
4
+ import UsingStyleName from './UsingStyleName' ;
5
+
6
+ import UsingStylesProperty from './UsingStylesProperty' ;
7
+ import UsingStylesPropertyStyles from './UsingStylesProperty/custom.css' ;
8
+
4
9
import UsingDecorator from './UsingDecorator' ;
5
10
6
11
ReactDOM . render ( < div >
7
- < UsingstyleName />
12
+ < UsingStyleName />
13
+ < UsingStylesProperty styles = { UsingStylesPropertyStyles } />
8
14
< UsingDecorator />
9
15
</ div > , document . querySelector ( '#app' ) ) ;
Original file line number Diff line number Diff line change
1
+ .table {
2
+ width : 200px ;
3
+ }
4
+
5
+ .table ,
6
+ .row ,
7
+ .cell {
8
+ margin : 10px ; overflow : hidden;
9
+ }
10
+
11
+ .table {
12
+ border : 1px solid # 000 ;
13
+ }
14
+
15
+ .row {
16
+ border : 1px solid # f00 ;
17
+ }
18
+
19
+ .cell {
20
+ border : 1px solid # 00f ; padding : 10px ;
21
+ }
Original file line number Diff line number Diff line change @@ -55,8 +55,7 @@ module.exports = {
55
55
]
56
56
} ,
57
57
resolve : {
58
- // Required for development only.
59
- root : path . resolve ( __dirname , 'node_modules' ) ,
58
+ // root: path.resolve(__dirname, 'node_modules'),
60
59
extensions : [
61
60
'' ,
62
61
'.js'
You can’t perform that action at this time.
0 commit comments