Sha256: 7c903a7f29f20c25b3b25a848a4abe9bc98ca48c8e91790f4cd3a6f2b84555c4

Contents?: true

Size: 825 Bytes

Versions: 3

Compression:

Stored size: 825 Bytes

Contents

import React from 'react';
import PropTypes from 'prop-types';
import { translate as __ } from 'foremanReact/common/I18n';
import SwitcherPF4 from '../../../common/Switcher/SwitcherPF4';

const AutoUploadSwitcher = ({ autoUploadEnabled, handleToggle }) => (
  <div className="auto_upload_switcher">
    <SwitcherPF4
      id="auto-upload-setting-switcher"
      label={__('Auto upload')}
      tooltip={__(
        'Enable automatic upload of your hosts inventory to the Red Hat cloud'
      )}
      isChecked={autoUploadEnabled}
      onChange={() => handleToggle(autoUploadEnabled)}
    />
  </div>
);

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

AutoUploadSwitcher.defaultProps = {
  autoUploadEnabled: true,
};

export default AutoUploadSwitcher;

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
foreman_rh_cloud-3.0.17 webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/AutoUploadSwitcher.js
foreman_rh_cloud-3.0.16 webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/AutoUploadSwitcher.js
foreman_rh_cloud-3.0.15 webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/AutoUploadSwitcher.js