<commit_before>import React from 'react';
import { Modal, ModalBody, ModalFooter, Button } from 'elemental';

module.exports = React.createClass({
	displayName: 'ConfirmationDialog',

	propTypes: {
		body: React.PropTypes.string.isRequired,
		cancelLabel: React.PropTypes.string,
		confirmationLabel: React.PropTypes.string,
		onCancel: React.PropTypes.func.isRequired,
		onConfirmation: React.PropTypes.func.isRequired,
	},

	getDefaultProps () {
		return {
			cancelLabel: 'Cancel',
			confirmationLabel: 'Ok',
		};
	},

	getBodyHtml () {
		return {
			__html: this.props.body
		};
	},

	render () {
		return (
			<Modal onCancel={this.props.onCancel} width={400} isOpen backdropClosesModal>
				<ModalBody>
					<div dangerouslySetInnerHTML={this.getBodyHtml()} />
				</ModalBody>
				<ModalFooter>
					<Button size="sm" type="danger" onClick={this.props.onConfirmation}>
						{this.props.confirmationLabel}
					</Button>
					<Button size="sm" type="link-cancel" onClick={this.props.onCancel}>
						{this.props.cancelLabel}
					</Button>
				</ModalFooter>
			</Modal>
		);
	}
});<commit_msg>Add support for different confirm button types in `ConfirmationDialog`<commit_after>import React from 'react';
import { Modal, ModalBody, ModalFooter, Button } from 'elemental';

module.exports = React.createClass({
	displayName: 'ConfirmationDialog',

	propTypes: {
		body: React.PropTypes.string.isRequired,
		cancelLabel: React.PropTypes.string,
		confirmationLabel: React.PropTypes.string,
		confirmationType: React.PropTypes.oneOf(['danger', 'warning', 'primary']),
		onCancel: React.PropTypes.func.isRequired,
		onConfirmation: React.PropTypes.func.isRequired,
	},

	getDefaultProps () {
		return {
			cancelLabel: 'Cancel',
			confirmationLabel: 'Ok',
			confirmationType: 'danger'
		};
	},

	getBodyHtml () {
		return {
			__html: this.props.body
		};
	},

	render () {
		return (
			<Modal onCancel={this.props.onCancel} width={400} isOpen backdropClosesModal>
				<ModalBody>
					<div dangerouslySetInnerHTML={this.getBodyHtml()} />
				</ModalBody>
				<ModalFooter>
					<Button size="sm" type={this.props.confirmationType} onClick={this.props.onConfirmation}>
						{this.props.confirmationLabel}
					</Button>
					<Button size="sm" type="link-cancel" onClick={this.props.onCancel}>
						{this.props.cancelLabel}
					</Button>
				</ModalFooter>
			</Modal>
		);
	}
});
{'fraction_non_alphanumeric': 0.14357471745500208, 'fraction_numerical': 0.0025115110925073253, 'mean_word_length': 4.1068376068376065, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6879093', 'n_tokens_mistral': 921, 'n_tokens_neox': 778, 'n_words': 138}