// Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import type { ReactNode } from 'react'; import React, { forwardRef } from 'react'; import classNames from 'classnames'; export enum SystemMessageKind { Normal = 'Normal', Danger = 'Danger', Error = 'Error', } type PropsType = { icon: string; contents: ReactNode; button?: ReactNode; kind?: SystemMessageKind; }; export const SystemMessage = forwardRef( function SystemMessageInner( { icon, contents, button, kind = SystemMessageKind.Normal }, ref ) { return (
{contents}
{button && (
{button}
)}
); } );