/* eslint react/prop-types: 0 */ import React, { Component } from "react"; import { Button, Modal, ModalHeader, ModalBody, ModalFooter } from "reactstrap"; class ModalConfirm extends Component { constructor(props) { super(props); this.state = { modal: false }; } toggle = () => { this.setState({ modal: !this.state.modal }); }; getComponent = key => { return this.props.children.filter(comp => { return comp.key === key; }); }; render() { return ( {this.getComponent("title")} {this.getComponent("body")} ); } } export default ModalConfirm;