Styling adjustments to timeline notifications
This commit is contained in:
parent
4bed918cf8
commit
7f34bedd87
22 changed files with 437 additions and 360 deletions
38
ts/components/conversation/SystemMessage.tsx
Normal file
38
ts/components/conversation/SystemMessage.tsx
Normal file
|
@ -0,0 +1,38 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import React, { ReactNode, forwardRef } from 'react';
|
||||
import classNames from 'classnames';
|
||||
|
||||
type PropsType = {
|
||||
icon: string;
|
||||
contents: ReactNode;
|
||||
button?: ReactNode;
|
||||
isError?: boolean;
|
||||
};
|
||||
|
||||
export const SystemMessage = forwardRef<HTMLDivElement, PropsType>(
|
||||
({ icon, contents, button, isError }, ref) => {
|
||||
return (
|
||||
<div
|
||||
className={classNames(
|
||||
'SystemMessage',
|
||||
isError && 'SystemMessage--error'
|
||||
)}
|
||||
ref={ref}
|
||||
>
|
||||
<div
|
||||
className={classNames(
|
||||
'SystemMessage__contents',
|
||||
`SystemMessage__contents--icon-${icon}`
|
||||
)}
|
||||
>
|
||||
{contents}
|
||||
</div>
|
||||
{button && (
|
||||
<div className="SystemMessage__button-container">{button}</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue