// Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; import { Button, ButtonVariant } from './Button'; import type { LocalizerType } from '../types/Util'; import { useEscapeHandling } from '../hooks/useEscapeHandling'; export type PropsType = { i18n: LocalizerType; message: string; onAccept: () => unknown; onClose: () => unknown; }; function focusRef(el: HTMLElement | null) { if (el) { el.focus(); } } export function PermissionsPopup({ i18n, message, onAccept, onClose, }: PropsType): JSX.Element { useEscapeHandling(onClose); return (
{message}
); }