Sha256: 4560d8cb35555cd850053591f4d22c26b2a3c361b0dc9e5637491e740a9c32a9

Contents?: true

Size: 849 Bytes

Versions: 1

Compression:

Stored size: 849 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">
    <span>Auto upload</span>
    <FieldLevelHelp
      content={__(
        'Enable automatic upload of your hosts inventory to the Red Hat cloud'
      )}
    />
    <Switch
      size="mini"
      value={autoUploadEnabled}
      onChange={() => handleToggle(autoUploadEnabled)}
    />
  </div>
);

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

AutoUploadSwitcher.defaultProps = {
  autoUploadEnabled: true,
};

export default AutoUploadSwitcher;

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
foreman_rh_cloud-3.0.14 webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/AutoUploadSwitcher.js