import React, { Component } from "react"; import { Popover, Button, Typography, Space, Input } from "antd"; interface IProps { typ: string; confirm: string; onConfirm: () => void; } interface ConfirmState { confirm: string; } class DeleteConfirmContent extends Component { constructor(props: IProps) { super(props); this.state = { confirm: "", }; } onChange = (e: React.ChangeEvent) => { this.setState({ confirm: e.target.value, }); }; render() { return ( Enter '{this.props.confirm}' to confirm you want to delete this {this.props.typ}: ); } } class DeleteConfirm extends Component { render() { return ( } trigger="click" placement="left"> {this.props.children} ); } } export default DeleteConfirm;