File size: 769 Bytes
b59aa07
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import { BaseModal } from "./base-modal";

interface DangerModalProps {
  testId?: string;

  title: string;
  description: string;

  buttons: {
    danger: { text: string; onClick: () => void };
    cancel: { text: string; onClick: () => void };
  };
}

export function DangerModal({
  testId,
  title,
  description,
  buttons,
}: DangerModalProps) {
  return (
    <BaseModal
      testId={testId}
      title={title}
      description={description}
      buttons={[
        {
          text: buttons.danger.text,
          onClick: buttons.danger.onClick,
          className: "bg-danger",
        },
        {
          text: buttons.cancel.text,
          onClick: buttons.cancel.onClick,
          className: "bg-neutral-500",
        },
      ]}
    />
  );
}