2
0

CopyToResult.tsx 821 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import { Button, Result } from "antd";
  2. interface IWidget {
  3. onClose?: Function;
  4. onInit?: Function;
  5. }
  6. const CopytoResultWidget = ({ onClose, onInit }: IWidget) => {
  7. return (
  8. <Result
  9. status="success"
  10. title="Successfully Copied!"
  11. subTitle="Sentence: 23 , Words: 143"
  12. extra={[
  13. <Button
  14. key="init"
  15. onClick={() => {
  16. if (typeof onInit !== "undefined") {
  17. onInit();
  18. }
  19. }}
  20. >
  21. 从新开始
  22. </Button>,
  23. <Button
  24. key="close"
  25. type="primary"
  26. onClick={() => {
  27. if (typeof onClose !== "undefined") {
  28. onClose();
  29. }
  30. }}
  31. >
  32. 关闭
  33. </Button>,
  34. ]}
  35. />
  36. );
  37. };
  38. export default CopytoResultWidget;