Sha256: 75104847fa7104f9c743b9199e6838fdbda0ff5a9a6e0f8a99e73368562397f3

Contents?: true

Size: 895 Bytes

Versions: 11

Compression:

Stored size: 895 Bytes

Contents

import React from 'react';
import { DropdownButton, MenuItem } from 'patternfly-react';
import PropTypes from 'prop-types';
import { translate as __ } from 'foremanReact/common/I18n';

export const ActionSelectButton = ({ onCancel, onResume, disabled }) => (
  <DropdownButton
    title={__('Select Action')}
    disabled={disabled}
    id="selcted-action-type"
  >
    <MenuItem
      title={__('Cancel selected tasks')}
      onClick={onCancel}
      eventKey="1"
    >
      {__('Cancel Selected')}
    </MenuItem>
    <MenuItem
      title={__('Resume selected tasks')}
      onClick={onResume}
      eventKey="2"
    >
      {__('Resume Selected')}
    </MenuItem>
  </DropdownButton>
);

ActionSelectButton.propTypes = {
  disabled: PropTypes.bool,
  onCancel: PropTypes.func.isRequired,
  onResume: PropTypes.func.isRequired,
};

ActionSelectButton.defaultProps = {
  disabled: false,
};

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
foreman-tasks-1.1.3 webpack/ForemanTasks/Components/TasksTable/Components/ActionSelectButton.js
foreman-tasks-1.1.2 webpack/ForemanTasks/Components/TasksTable/Components/ActionSelectButton.js
foreman-tasks-1.1.1 webpack/ForemanTasks/Components/TasksTable/Components/ActionSelectButton.js
foreman-tasks-1.1.0 webpack/ForemanTasks/Components/TasksTable/Components/ActionSelectButton.js
foreman-tasks-0.17.6 webpack/ForemanTasks/Components/TasksTable/Components/ActionSelectButton.js
foreman-tasks-1.0.1 webpack/ForemanTasks/Components/TasksTable/Components/ActionSelectButton.js
foreman-tasks-1.0.0 webpack/ForemanTasks/Components/TasksTable/Components/ActionSelectButton.js
foreman-tasks-0.17.5 webpack/ForemanTasks/Components/TasksTable/Components/ActionSelectButton.js
foreman-tasks-0.17.4 webpack/ForemanTasks/Components/TasksTable/Components/ActionSelectButton.js
foreman-tasks-0.17.3 webpack/ForemanTasks/Components/TasksTable/Components/ActionSelectButton.js
foreman-tasks-0.17.2 webpack/ForemanTasks/Components/TasksTable/Components/ActionSelectButton.js