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/ConfirmDialog.tsx

34 lines
808 B
TypeScript

import React from 'react';
interface Props {
titleText: string;
messageText: string;
okText: string;
cancelText: string;
onConfirm: any;
onClose: any;
}
export class ConfirmDialog extends React.Component<Props> {
constructor(props: any) {
super(props);
}
public render() {
return (
<div className="content">
<p className="titleText">{this.props.titleText}</p>
<p className="messageText">{this.props.messageText}</p>
<div className="buttons">
<button className="cancel" tabIndex={0} onClick={this.props.onClose}>
{this.props.cancelText}
</button>
<button className="ok" tabIndex={0} onClick={this.props.onConfirm}>
{this.props.okText}
</button>
</div>
</div>
);
}
}