File size: 1,176 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
42
import { useTranslation } from "react-i18next";
import { ModalBackdrop } from "#/components/shared/modals/modal-backdrop";
import { I18nKey } from "#/i18n/declaration";
import { BrandButton } from "../brand-button";

interface ResetSettingsModalProps {
  onReset: () => void;
}

export function ResetSettingsModal({ onReset }: ResetSettingsModalProps) {
  const { t } = useTranslation();

  return (
    <ModalBackdrop>
      <div className="bg-base-secondary p-4 rounded-xl flex flex-col gap-4 border border-tertiary">
        <p>{t(I18nKey.SETTINGS$RESET_CONFIRMATION)}</p>
        <div className="w-full flex gap-2" data-testid="reset-settings-modal">
          <BrandButton
            testId="confirm-button"
            type="submit"
            name="reset-settings"
            variant="primary"
            className="grow"
          >
            Reset
          </BrandButton>

          <BrandButton
            testId="cancel-button"
            type="button"
            variant="secondary"
            className="grow"
            onClick={onReset}
          >
            Cancel
          </BrandButton>
        </div>
      </div>
    </ModalBackdrop>
  );
}