1
0
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:
Brett Sun 2015-10-30 11:13:32 +01:00
parent 22234492e6
commit 5bec3c5dc6

View File

@ -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>