import React, { PropTypes, Component } from 'react'; import Formsy from 'formsy-react'; import FRC from 'formsy-react-components'; const Input = FRC.Input; class ThumbnailURL extends Component { constructor(props) { super(props); this.clearThumbnail = this.clearThumbnail.bind(this); this.showInput = this.showInput.bind(this); this.state = { showInput: false }; } clearThumbnail() { this.context.updateCurrentValue("thumbnailUrl", ""); } showInput() { this.setState({ showInput: true }); } renderThumbnail() { return (
) } render() { const {name, value, label} = this.props; const inputType = this.state.showInput ? "text" : "hidden"; return (