-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Format js files with standard Bump lodash from 4.17.10 to 4.17.13
- Loading branch information
1 parent
fee8d17
commit ada5880
Showing
27 changed files
with
318 additions
and
247 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"extends": "react-app" | ||
"extends": "standard" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import React from 'react' | ||
|
||
export default ({ title = '' }) => ( | ||
<div className="loading"> | ||
<h1 className="page-title">{title.replace(/_/g, ' ')}</h1> | ||
<div className='loading'> | ||
<h1 className='page-title'>{title.replace(/_/g, ' ')}</h1> | ||
</div> | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,53 @@ | ||
import React, { Component } from "react"; | ||
import { createPortal } from "react-dom"; | ||
import withClickOutside from "react-click-outside"; | ||
import React, { Component } from 'react' | ||
import { createPortal } from 'react-dom' | ||
import withClickOutside from 'react-click-outside' | ||
|
||
class Modal extends Component { | ||
constructor() { | ||
super(); | ||
this.el = null; | ||
constructor () { | ||
super() | ||
this.el = null | ||
} | ||
|
||
componentDidMount() { | ||
this.el = document.createElement("div"); | ||
document.querySelector(".settings-wrapper").appendChild(this.el); | ||
componentDidMount () { | ||
this.el = document.createElement('div') | ||
document.querySelector('.settings-wrapper').appendChild(this.el) | ||
} | ||
|
||
componentWillUnmount() { | ||
componentWillUnmount () { | ||
if (this.el) { | ||
this.el.remove(); | ||
this.el.remove() | ||
} | ||
} | ||
|
||
handleClickOutside(event) { | ||
const { closeOnOutsideClick, handleClose } = this.props; | ||
handleClickOutside (event) { | ||
const { closeOnOutsideClick, handleClose } = this.props | ||
|
||
if (closeOnOutsideClick) { | ||
event.preventDefault(); | ||
return handleClose(); | ||
return handleClose() | ||
} | ||
} | ||
|
||
render() { | ||
const { children, handleClose, isOpen, title } = this.props; | ||
render () { | ||
const { children, handleClose, isOpen, title } = this.props | ||
|
||
if (!isOpen) return null; | ||
if (!isOpen) return null | ||
|
||
return createPortal( | ||
<div className="modal"> | ||
{title && <h3 className="modal-title">{title}</h3>} | ||
<div className='modal'> | ||
{title && <h3 className='modal-title'>{title}</h3>} | ||
{children} | ||
<button className="close" onClick={handleClose}> | ||
<button className='close' onClick={handleClose}> | ||
Close | ||
</button> | ||
</div>, | ||
this.el | ||
); | ||
) | ||
} | ||
} | ||
|
||
Modal.defaultProps = { | ||
closeOnOutsideClick: true, | ||
isOpen: false | ||
}; | ||
} | ||
|
||
export default withClickOutside(Modal); | ||
export default withClickOutside(Modal) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.