UNPKG

@bigfishtv/cockpit

Version:

22 lines (18 loc) 498 B
import PropTypes from 'prop-types' import React, { Component } from 'react' import Icon from '../Icon' export default class ModalToolbar extends Component { static propTypes = { onClose: PropTypes.func, } static defaultProps = { onClose: () => console.warn('No onClose prop given to ModalToolbar'), } render() { return ( <button type="button" className="button button-icon margin-left-xsmall" onClick={this.props.onClose}> <Icon name="close" size="18" /> </button> ) } }