Skip to content

Commit 8c9d8c1

Browse files
committed
working with inline style
1 parent 021bc87 commit 8c9d8c1

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/App.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,21 @@ class App extends Component {
3535
};
3636

3737
render() {
38+
39+
const style = {
40+
backgroundColor: 'white',
41+
font: 'inherit',
42+
border: '1px solid blue',
43+
padding: '8px',
44+
cursor: 'pointer'
45+
};
46+
3847
return (
3948
<div className="App">
4049
<h1>Hi, I'am React App</h1>
41-
<button onClick={() => this.switchNameHandler('Bobby')}>Switch name</button>
50+
<button
51+
style={style}
52+
onClick={() => this.switchNameHandler('Bobby')}>Switch name</button>
4253
<Person
4354
name={this.state.persons[0].name}
4455
age={this.state.persons[0].age} />

0 commit comments

Comments
 (0)