2018-04-03 22:56:12 +00:00
|
|
|
import React from 'react';
|
2018-04-12 06:55:32 +00:00
|
|
|
import classnames from 'classnames';
|
2018-04-03 22:56:12 +00:00
|
|
|
|
|
|
|
|
2018-04-05 19:21:22 +00:00
|
|
|
interface Props {
|
2018-04-03 22:56:12 +00:00
|
|
|
/**
|
|
|
|
* Corresponds to the theme setting in the app, and the class added to the root element.
|
|
|
|
*/
|
2018-04-05 15:37:04 +00:00
|
|
|
theme: 'ios' | 'android' | 'android-dark';
|
2018-04-14 01:01:02 +00:00
|
|
|
type: 'private' | 'group';
|
2018-04-03 22:56:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Provides the parent elements necessary to allow the main Signal Desktop stylesheet to
|
2018-04-05 22:30:40 +00:00
|
|
|
* apply (with no changes) to messages in the Style Guide.
|
2018-04-03 22:56:12 +00:00
|
|
|
*/
|
2018-04-05 19:41:48 +00:00
|
|
|
export class ConversationContext extends React.Component<Props, {}> {
|
2018-04-03 22:56:12 +00:00
|
|
|
public render() {
|
2018-04-14 01:01:02 +00:00
|
|
|
const { theme, type } = this.props;
|
2018-04-03 22:56:12 +00:00
|
|
|
|
|
|
|
return (
|
2018-04-12 06:55:32 +00:00
|
|
|
<div className={theme || 'android'}>
|
2018-04-14 01:01:02 +00:00
|
|
|
<div className={classnames('conversation', type || 'private')}>
|
2018-04-03 22:56:12 +00:00
|
|
|
<div className="discussion-container" style={{padding: '0.5em'}}>
|
|
|
|
<ul className="message-list">
|
|
|
|
{this.props.children}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|