Sha256: 4cbe24d6a179f2ea2e33e9046de50ec797c34fc7e91b9c30d3de7ee116e1d849
Contents?: true
Size: 1.39 KB
Versions: 21
Compression:
Stored size: 1.39 KB
Contents
import React from 'react'; import PropTypes from 'prop-types'; import { ListView, LoadingState } from 'patternfly-react'; import Pagination from 'foremanReact/components/Pagination'; import AnsibleRole from './AnsibleRole'; const AvailableRolesList = ({ unassignedRoles, pagination, itemCount, onListingChange, onAddRole, loading, }) => ( <ListView> <div className="sticky-pagination"> <Pagination viewType="list" itemCount={itemCount} updateParamsByUrl={false} page={pagination.page} perPage={pagination.perPage} onChange={onListingChange} dropdownButtonId="available-ansible-roles-pagination-row-dropdown" /> </div> <LoadingState loading={loading}> {unassignedRoles.map((role, index) => ( <AnsibleRole key={role.id} role={role} icon="fa fa-plus-circle" onClick={onAddRole} index={index} /> ))} </LoadingState> </ListView> ); AvailableRolesList.propTypes = { unassignedRoles: PropTypes.arrayOf(PropTypes.object).isRequired, pagination: PropTypes.shape({ page: PropTypes.number, perPage: PropTypes.number, }).isRequired, itemCount: PropTypes.number.isRequired, onListingChange: PropTypes.func.isRequired, onAddRole: PropTypes.func.isRequired, loading: PropTypes.bool.isRequired, }; export default AvailableRolesList;
Version data entries
21 entries across 21 versions & 1 rubygems