Support for creating New Groups
This commit is contained in:
parent
1934120e46
commit
5de4babc0d
56 changed files with 6222 additions and 526 deletions
32
ts/components/Alert.tsx
Normal file
32
ts/components/Alert.tsx
Normal file
|
@ -0,0 +1,32 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import React, { FunctionComponent } from 'react';
|
||||
|
||||
import { LocalizerType } from '../types/Util';
|
||||
import { Button } from './Button';
|
||||
import { ModalHost } from './ModalHost';
|
||||
|
||||
type PropsType = {
|
||||
title?: string;
|
||||
body: string;
|
||||
i18n: LocalizerType;
|
||||
onClose: () => void;
|
||||
};
|
||||
|
||||
export const Alert: FunctionComponent<PropsType> = ({
|
||||
body,
|
||||
i18n,
|
||||
onClose,
|
||||
title,
|
||||
}) => (
|
||||
<ModalHost onClose={onClose}>
|
||||
<div className="module-Alert">
|
||||
{title && <h1 className="module-Alert__title">{title}</h1>}
|
||||
<p className="module-Alert__body">{body}</p>
|
||||
<div className="module-Alert__button-container">
|
||||
<Button onClick={onClose}>{i18n('Confirmation--confirm')}</Button>
|
||||
</div>
|
||||
</div>
|
||||
</ModalHost>
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue