import React, {Component} from 'react'; import classnames from 'classnames'; import CopyButton from '../base/CopyButton'; import Modal from '../base/Modal'; import ModalBody from '../base/ModalBody'; import ModalHeader from '../base/ModalHeader'; import ModalFooter from '../base/ModalFooter'; import * as sync from '../../../sync'; import PromptButton from '../base/PromptButton'; class WorkspaceSettingsModal extends Component { state = { workspace: null }; _handleSetModalRef = n => this.modal = n; toggle (workspace) { this.modal.toggle(); this.setState({workspace}); } show (workspace) { this.modal.show(); this.setState({workspace}); } hide () { this.modal.hide(); } renderModalBody (workspace) { return ( Delete {workspace.name} ) } renderModalHeader (workspace) { return ( {workspace.name} Configuration ) } render () { const {workspace} = this.state; return ( {workspace ? this.renderModalHeader(workspace) : null} {workspace ? this.renderModalBody(workspace) : null} ) } } WorkspaceSettingsModal.propTypes = {}; export default WorkspaceSettingsModal;