You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
session-desktop/ts/components/conversation/Notification.tsx

33 lines
643 B
TypeScript

import React from 'react';
import classNames from 'classnames';
interface Props {
type: string;
onClick: () => void;
}
export class Notification extends React.Component<Props> {
public renderContents() {
const { type } = this.props;
return <span>Notification of type {type}</span>;
}
public render() {
const { onClick } = this.props;
return (
<div
role="button"
onClick={onClick}
className={classNames(
'module-notification',
onClick ? 'module-notification--with-click-handler' : null
)}
>
{this.renderContents()}
</div>
);
}
}