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

34 lines
848 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 { BaseConversationListItem } from './BaseConversationListItem';
import type { LocalizerType } from '../../types/Util';
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 (
<BaseConversationListItem
2021-05-07 22:21:10 +00:00
acceptedMessageRequest={false}
2021-03-03 20:09:58 +00:00
conversationType="group"
headerName={title}
i18n={i18n}
2021-05-07 22:21:10 +00:00
isMe={false}
2021-03-03 20:09:58 +00:00
isSelected={false}
onClick={onClick}
2021-05-07 22:21:10 +00:00
sharedGroupNames={[]}
2021-03-03 20:09:58 +00:00
title={title}
/>
);
}
);