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.
42 lines
860 B
TypeScript
42 lines
860 B
TypeScript
5 years ago
|
import React from 'react';
|
||
|
import classNames from 'classnames';
|
||
|
|
||
|
//import { LocalizerType } from '../../types/Util';
|
||
|
|
||
|
export enum SessionButtonTypes {
|
||
|
fullGreen = 'fullGreen',
|
||
|
white = 'white',
|
||
|
green = 'green',
|
||
|
}
|
||
|
|
||
|
interface Props {
|
||
|
//i18n: LocalizerType;
|
||
|
text: string;
|
||
|
buttonType: SessionButtonTypes;
|
||
|
}
|
||
|
|
||
|
|
||
|
export class SessionButton extends React.PureComponent<Props> {
|
||
|
|
||
|
public render() {
|
||
|
const {
|
||
|
buttonType,
|
||
|
text
|
||
|
} = this.props;
|
||
|
|
||
|
return (
|
||
|
<div
|
||
|
className={classNames(
|
||
|
'session-button',
|
||
|
buttonType === SessionButtonTypes.green? 'green' : '',
|
||
|
buttonType === SessionButtonTypes.fullGreen? 'full-green' : '',
|
||
|
buttonType === SessionButtonTypes.white? 'white' : '',
|
||
|
)}
|
||
|
role='button'
|
||
|
>
|
||
|
{text}
|
||
|
</div>
|
||
|
);
|
||
|
}
|
||
|
}
|