Sha256: 24c7ae78c5aeb17c79e64b5e7721bd06f8c7b422422768c6d7c74fc80561315c

Contents?: true

Size: 854 Bytes

Versions: 9

Compression:

Stored size: 854 Bytes

Contents

import React from 'react';
import PropTypes from 'prop-types';
import { Switch, FieldLevelHelp } from 'patternfly-react';
import { translate as __ } from 'foremanReact/common/I18n';
import './autoUploadSwitcher.scss';

const AutoUploadSwitcher = ({ autoUploadEnabled, handleToggle }) => (
  <div className="auto_upload_switcher">
    <Switch
      size="mini"
      value={autoUploadEnabled}
      onChange={() => handleToggle(autoUploadEnabled)}
    />
    <FieldLevelHelp
      content={__(
        'Enable automatic upload of your host inventory to the Red Hat cloud'
      )}
    />
    <span>Allow Auto Upload</span>
  </div>
);

AutoUploadSwitcher.propTypes = {
  autoUploadEnabled: PropTypes.bool,
  handleToggle: PropTypes.func.isRequired,
};

AutoUploadSwitcher.defaultProps = {
  autoUploadEnabled: true,
};

export default AutoUploadSwitcher;

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
foreman_rh_cloud-0.9.7 webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/AutoUploadSwitcher.js
foreman_rh_cloud-1.0.7 webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/AutoUploadSwitcher.js
foreman_rh_cloud-2.0.7 webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/AutoUploadSwitcher.js
foreman_rh_cloud-0.9.6 webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/AutoUploadSwitcher.js
foreman_rh_cloud-1.0.6 webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/AutoUploadSwitcher.js
foreman_rh_cloud-2.0.6 webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/AutoUploadSwitcher.js
foreman_rh_cloud-0.9.5 webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/AutoUploadSwitcher.js
foreman_rh_cloud-1.0.5 webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/AutoUploadSwitcher.js
foreman_rh_cloud-2.0.5 webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/AutoUploadSwitcher.js