mirror of
https://github.com/ascribe/onion.git
synced 2024-12-23 09:50:31 +01:00
Use const for the cloned trigger element
This commit is contained in:
parent
22234492e6
commit
5bec3c5dc6
@ -56,7 +56,7 @@ let ModalWrapper = React.createClass({
|
|||||||
|
|
||||||
// If the trigger component exists, we add the ModalWrapper's show() as its onClick method.
|
// If the trigger component exists, we add the ModalWrapper's show() as its onClick method.
|
||||||
// The trigger component should, in most cases, be a button.
|
// The trigger component should, in most cases, be a button.
|
||||||
let clonedTrigger = React.isValidElement(trigger) ? React.cloneElement(trigger, {onClick: this.show})
|
const clonedTrigger = React.isValidElement(trigger) ? React.cloneElement(trigger, {onClick: this.show})
|
||||||
: null;
|
: null;
|
||||||
return (
|
return (
|
||||||
<span>
|
<span>
|
||||||
|
Loading…
Reference in New Issue
Block a user