Sha256: 2bdeaa91c3dcf0f482b1fbf93cdea57956b69b5130fc39c7a50db5659c06bbee
Contents?: true
Size: 1.43 KB
Versions: 82
Compression:
Stored size: 1.43 KB
Contents
import React from 'react'; import PropTypes from 'prop-types'; import { Grid, Button, Icon } from 'patternfly-react'; import { noop } from 'foremanReact/common/helpers'; import { sprintf, translate as __ } from 'foremanReact/common/I18n'; import { isExitCodeLoading } from '../../ForemanInventoryHelpers'; import './tabHeader.scss'; const TabHeader = ({ exitCode, onRestart, onDownload, toggleFullScreen }) => ( <Grid.Row className="tab-header"> <Grid.Col sm={6}> <p>{sprintf(__('Exit Code: %s'), exitCode)}</p> </Grid.Col> <Grid.Col sm={6}> <div className="tab-action-buttons"> {onRestart ? ( <Button bsStyle="primary" onClick={onRestart} disabled={isExitCodeLoading(exitCode)} > {__('Restart')} </Button> ) : null} {onDownload ? ( <Button onClick={onDownload}> {__('Download Report')} <Icon name="download" /> </Button> ) : null} <Button onClick={toggleFullScreen}> {__('Full Screen')} <Icon name="arrows-alt" /> </Button> </div> </Grid.Col> </Grid.Row> ); TabHeader.propTypes = { onRestart: PropTypes.func, onDownload: PropTypes.func, exitCode: PropTypes.string, toggleFullScreen: PropTypes.func, }; TabHeader.defaultProps = { onRestart: null, exitCode: '', onDownload: null, toggleFullScreen: noop, }; export default TabHeader;
Version data entries
82 entries across 82 versions & 1 rubygems