Files
Desktop/ts/components/conversation/Notification.tsx
Scott Nonnenberg dc11db92f9 New React component: Message
Also: Use react to render contects on the 'show group members' screen
2018-07-17 15:53:33 -07:00

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>
);
}
}