signal-desktop/ts/components/conversationList/CreateNewGroupButton.tsx

41 lines
1,009 B
TypeScript
Raw Normal View History

2021-03-03 20:09:58 +00:00
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import type { FunctionComponent } from 'react';
import React from 'react';
2021-03-03 20:09:58 +00:00
import type { LocalizerType } from '../../types/Util';
import { ListTile } from '../ListTile';
import { Avatar, AvatarSize } from '../Avatar';
2021-03-03 20:09:58 +00:00
type PropsType = {
i18n: LocalizerType;
onClick: () => void;
};
export const CreateNewGroupButton: FunctionComponent<PropsType> = React.memo(
2021-08-11 19:29:07 +00:00
function CreateNewGroupButton({ i18n, onClick }) {
2021-03-03 20:09:58 +00:00
const title = i18n('createNewGroupButton');
return (
<ListTile
2023-01-13 00:24:59 +00:00
testId="CreateNewGroupButton"
leading={
<Avatar
acceptedMessageRequest={false}
conversationType="group"
i18n={i18n}
isMe={false}
title={title}
sharedGroupNames={[]}
size={AvatarSize.THIRTY_TWO}
badge={undefined}
/>
}
2021-03-03 20:09:58 +00:00
title={title}
onClick={onClick}
2021-03-03 20:09:58 +00:00
/>
);
}
);