Sha256: 14cdb228099a5fe613dd8b9560feeacb20d4dd99d79e56aa8b6eb43681b3e313
Contents?: true
Size: 1.11 KB
Versions: 60
Compression:
Stored size: 1.11 KB
Contents
import React from 'react'; import { Grid, Row } from 'patternfly-react'; import TaskInfo from './TaskInfo'; import { ForceUnlockModal, UnlockModal } from '../../TaskActions/UnlockModals'; import { TaskButtons } from './TaskButtons'; const Task = props => { const { taskReload, id, forceCancelTaskRequest, unlockTaskRequest, action, taskReloadStart, } = props; const forceUnlock = () => { if (!taskReload) { taskReloadStart(id); } forceCancelTaskRequest(id, action); }; const unlock = () => { if (!taskReload) { taskReloadStart(id); } unlockTaskRequest(id, action); }; return ( <React.Fragment> <UnlockModal onClick={unlock} /> <ForceUnlockModal onClick={forceUnlock} /> <Grid> <Row> <TaskButtons taskReloadStart={taskReloadStart} {...props} /> </Row> <TaskInfo {...props} /> </Grid> </React.Fragment> ); }; Task.propTypes = { ...TaskInfo.PropTypes, ...TaskButtons.PropTypes, }; Task.defaultProps = { ...TaskInfo.defaultProps, ...TaskButtons.defaultProps, }; export default Task;
Version data entries
60 entries across 60 versions & 1 rubygems