forked from rajeshpillai/youtube-react-components
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
40 lines (32 loc) · 859 Bytes
/
App.js
File metadata and controls
40 lines (32 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import InputTag from './components/InputTag';
import Modal from './components/Modal/Modal';
import withBorder from './components/HOC/withBorder';
class App extends Component {
state = {
show: false,
}
showModal = () => {
this.setState({
...this.state,
show: !this.state.show
});
}
render() {
let WithBorderInput = withBorder (InputTag);
return (
<div className="App">
{/* <WithBorderInput placeholder="press enter/space to + tag" /> */}
<input type="button"
onClick={this.showModal}
value="Show Modal" />
<Modal onClose={this.showModal} show={this.state.show}>
This message is from Modal!
</Modal>
</div>
);
}
}
export default App;