first implementation

This commit is contained in:
Tobias Miesel
2018-10-17 15:21:32 +02:00
parent 0f8209ca22
commit 7c2b4fae5b
20 changed files with 65105 additions and 52 deletions

View File

@@ -0,0 +1,43 @@
import React, { Component, Fragment } from 'react'
import Modal, { Content } from 'components/Modal'
import Form from 'components/Form'
import { observable } from 'mobx'
import { observer } from 'mobx-react'
@observer
class Bubble extends Component {
@observable open = false
onOpen = (_e) => {
this.open = true
}
onClose = (_e) => {
this.open = false
}
// RENDER -------------------------------------------------------------------
render() {
return (
<Fragment>
<img
onClick={this.onOpen}
src={chrome.extension.getURL('src/images/logo.png')}
width="50%"
/>
{this.open &&
<Modal>
<Content>
<Form />
<button onClick={this.onClose}>Close</button>
</Content>
</Modal>
}
</Fragment>
)
}
}
export default Bubble