UnlinkModal.tsx 747 B

123456789101112131415161718192021222324252627
  1. import React from 'react';
  2. import { ConfirmModal } from '@grafana/ui';
  3. interface Props {
  4. isOpen: boolean;
  5. onConfirm: () => void;
  6. onDismiss: () => void;
  7. }
  8. export const UnlinkModal: React.FC<Props> = ({ isOpen, onConfirm, onDismiss }) => {
  9. return (
  10. <ConfirmModal
  11. title="Do you really want to unlink this panel?"
  12. icon="question-circle"
  13. body="If you unlink this panel, you will be able to edit it without affecting any other dashboards.
  14. However, once you make a change you will not be able to revert to its original reusable panel."
  15. confirmText="Yes, unlink"
  16. onConfirm={() => {
  17. onConfirm();
  18. onDismiss();
  19. }}
  20. onDismiss={onDismiss}
  21. isOpen={isOpen}
  22. />
  23. );
  24. };