'use strict';
import React from 'react';
module.exports = React.createClass({
displayName: 'Spoiler',
getInitialState() {
return {
visible: false,
};
},
toggleVisible() {
this.setState({ visible: !this.state.visible });
},
render: function() {
const reason = this.props.reason ? (
{"(" + this.props.reason + ")"}
) : null;
return (
{ reason }
);
}
})