mirror of
https://github.com/ascribe/onion.git
synced 2024-12-23 01:39:36 +01:00
Use const for the cloned trigger element
This commit is contained in:
parent
22234492e6
commit
5bec3c5dc6
@ -56,8 +56,8 @@ let ModalWrapper = React.createClass({
|
||||
|
||||
// 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.
|
||||
let clonedTrigger = React.isValidElement(trigger) ? React.cloneElement(trigger, {onClick: this.show})
|
||||
: null;
|
||||
const clonedTrigger = React.isValidElement(trigger) ? React.cloneElement(trigger, {onClick: this.show})
|
||||
: null;
|
||||
return (
|
||||
<span>
|
||||
{clonedTrigger}
|
||||
|
Loading…
Reference in New Issue
Block a user