import React from 'react'; import { Modal, ModalHeader, ModalBody } from 'reactstrap'; export default class LinkEditModal extends React.PureComponent { constructor(props) { super(props); this.state = { show: false, isUseRelativePath: false, inputValue: '~.cloud.~', labelInputValue: 'ここがリンク', }; this.cancel = this.cancel.bind(this); this.toggleIsUseRelativePath = this.toggleIsUseRelativePath.bind(this); this.showLog = this.showLog.bind(this); } show() { this.setState({ show: true }); } cancel() { this.hide(); } hide() { this.setState({ show: false, }); } toggleIsUseRelativePath() { this.setState({ isUseRelativePath: !this.state.isUseRelativePath }); } renderPreview() { // TODO GW-2658 } insertLinkIntoEditor() { // TODO GW-2659 } showLog() { console.log(this.state.inputValue); } handleInputChange(linkValue) { this.setState({ inputValue: linkValue }); } labelInputChange(labelValue) { this.setState({ labelInputValue: labelValue }); } render() { return ( Edit Links
this.handleInputChange(e.target.value)} />
{this.renderPreview} render preview
this.labelInputChange(e.target.value)} >
[[{this.state.labelInputValue} > {this.state.inputValue}]]
URI
URI
{this.renderPreview} render preview
); } }