Sha256: 90b52c94a9bd3bdc64d39c4855778faaa72d66a9707b36caf64be02cd902a34a
Contents?: true
Size: 628 Bytes
Versions: 12
Compression:
Stored size: 628 Bytes
Contents
import React from 'react'; import { Button } from 'patternfly-react'; import PropTypes from 'prop-types'; import { translate as __ } from 'foremanReact/common/I18n'; import { noop } from 'foremanReact/common/helpers'; export const CancelButton = ({ id, name, disabled, onClick }) => ( <Button bsSize="small" onClick={() => onClick(id, name)} disabled={disabled}> {__('Cancel')} </Button> ); CancelButton.propTypes = { id: PropTypes.string.isRequired, name: PropTypes.string.isRequired, disabled: PropTypes.bool, onClick: PropTypes.func, }; CancelButton.defaultProps = { disabled: false, onClick: noop, };
Version data entries
12 entries across 12 versions & 1 rubygems