UNPKG

@bigfishtv/cockpit

Version:

21 lines (18 loc) 561 B
import PropTypes from 'prop-types' import React, { Component } from 'react' import Button from '../button/Button' export default class ConfirmCancel extends Component { static propTypes = { /** function that gets called with a boolean corresponding to confirm/cancel */ callback: PropTypes.func, } render() { const style = this.props.style || 'primary' return ( <div> <Button text="Confirm" style={style} onClick={() => this.props.callback(true)} /> <Button text="Cancel" onClick={() => this.props.callback(false)} /> </div> ) } }