Sha256: d0d693b0ced08f395643a87fc328e738fd5eab2e4fc0eb263c32b03a6c77cc87

Contents?: true

Size: 2 KB

Versions: 59

Compression:

Stored size: 2 KB

Contents

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

const ListControls = props => (
  <div className="pf-c-dual-list-selector__controls">
    <div className="pf-c-dual-list-selector__controls-item">
      <button
        className="pf-c-button pf-m-plain"
        type="button"
        disabled={props.addSelectedDisabled}
        onClick={props.onAddSelected}
        aria-label={__('Add selected')}
      >
        <i className="fas fa-fw fa-angle-right" />
      </button>
    </div>
    <div className="pf-c-dual-list-selector__controls-item">
      <button
        className="pf-c-button pf-m-plain"
        type="button"
        disabled={props.addAllDisabled}
        onClick={props.onAddAll}
        aria-label={__('Add all')}
      >
        <i className="fas fa-fw fa-angle-double-right" />
      </button>
    </div>
    <div className="pf-c-dual-list-selector__controls-item">
      <button
        className="pf-c-button pf-m-plain"
        type="button"
        disabled={props.removeAllDisabled}
        onClick={props.onRemoveAll}
        aria-label={__('Remove all')}
      >
        <i className="fas fa-fw fa-angle-double-left" />
      </button>
    </div>
    <div className="pf-c-dual-list-selector__controls-item">
      <button
        className="pf-c-button pf-m-plain"
        type="button"
        disabled={props.removeSelectedDisabled}
        onClick={props.onRemoveSelected}
        aria-label={__('Remove selected')}
      >
        <i className="fas fa-fw fa-angle-left" />
      </button>
    </div>
  </div>
);

ListControls.propTypes = {
  addSelectedDisabled: PropTypes.bool.isRequired,
  onAddSelected: PropTypes.func.isRequired,
  addAllDisabled: PropTypes.bool.isRequired,
  onAddAll: PropTypes.func.isRequired,
  removeAllDisabled: PropTypes.bool.isRequired,
  onRemoveAll: PropTypes.func.isRequired,
  removeSelectedDisabled: PropTypes.bool.isRequired,
  onRemoveSelected: PropTypes.func.isRequired,
};

export default ListControls;

Version data entries

59 entries across 59 versions & 1 rubygems

Version Path
foreman_ansible-15.0.3 webpack/components/DualList/ListControls.js
foreman_ansible-15.0.2 webpack/components/DualList/ListControls.js
foreman_ansible-15.0.1 webpack/components/DualList/ListControls.js
foreman_ansible-15.0.0 webpack/components/DualList/ListControls.js
foreman_ansible-14.2.2 webpack/components/DualList/ListControls.js
foreman_ansible-14.2.1 webpack/components/DualList/ListControls.js
foreman_ansible-13.0.7 webpack/components/DualList/ListControls.js
foreman_ansible-14.2.0 webpack/components/DualList/ListControls.js
foreman_ansible-14.1.1 webpack/components/DualList/ListControls.js
foreman_ansible-14.1.0 webpack/components/DualList/ListControls.js
foreman_ansible-13.0.5 webpack/components/DualList/ListControls.js
foreman_ansible-14.0.0 webpack/components/DualList/ListControls.js
foreman_ansible-13.0.4 webpack/components/DualList/ListControls.js
foreman_ansible-13.0.3 webpack/components/DualList/ListControls.js
foreman_ansible-13.0.2 webpack/components/DualList/ListControls.js
foreman_ansible-13.0.1 webpack/components/DualList/ListControls.js
foreman_ansible-13.0.0 webpack/components/DualList/ListControls.js
foreman_ansible-12.0.7 webpack/components/DualList/ListControls.js
foreman_ansible-10.4.4 webpack/components/DualList/ListControls.js
foreman_ansible-7.1.8 webpack/components/DualList/ListControls.js