Sha256: fc226f46f0d9ccaff60b4eef1b9de5009118d80fe3968f7b05b890be9c6c2b24
Contents?: true
Size: 702 Bytes
Versions: 4
Compression:
Stored size: 702 Bytes
Contents
import React from 'react'; import PropTypes from 'prop-types'; import { useForemanModal } from 'foremanReact/components/ForemanModal/ForemanModalHooks'; import WebhooksTable from './WebhooksTable'; import { WEBHOOK_DELETE_MODAL_ID } from '../../../constants'; const WrappedWebhooksTable = props => { const { setModalOpen } = useForemanModal({ id: WEBHOOK_DELETE_MODAL_ID }); const { setToDelete, ...rest } = props; const onDeleteClick = rowData => { setToDelete(rowData); setModalOpen(); }; return <WebhooksTable {...rest} onDeleteClick={onDeleteClick} />; }; WrappedWebhooksTable.propTypes = { setToDelete: PropTypes.func.isRequired, }; export default WrappedWebhooksTable;
Version data entries
4 entries across 4 versions & 1 rubygems