1 parent 891b4ea commit 8366171Copy full SHA for 8366171
1 file changed
webpack_in/entry.jsx
@@ -12,16 +12,19 @@ import ReactDOM from 'react-dom';
12
13
const objStyleCommon = {
14
margin: '1em',
15
- padding: '1em',
16
border: 'solid 2px green',
17
textAlign: 'center'
18
};
19
+const objStyleContent = {
20
+ padding: '1em'
21
+ };
22
+
23
24
class HelloWidget extends React.Component {
25
render() {
26
return (
- <div style={ objStyleCommon }>
27
+ <div style={{ ...objStyleCommon, ...objStyleContent }}>
28
Hello! I'm a React app!!
29
</div>
30
);
@@ -32,7 +35,7 @@ class TextWidget extends React.Component {
32
35
33
36
34
37
<div style={ objStyleCommon }>
- <div>Some text here....</div>
38
+ <div style={ objStyleContent }>Some text here....</div>
39
<button>Change text...</button>
40
41
0 commit comments