import React, { useContext, useState } from 'react'; import { Button } from '@patternfly/react-core'; import { FormSpy } from '@data-driven-forms/react-form-renderer'; import WizardContext from '@data-driven-forms/react-form-renderer/wizard-context'; import PropTypes from 'prop-types'; const CustomButtons = ({ buttonLabels: { cancel, submit, back }}) => { const [ isSaving, setIsSaving ] = useState(false); const { handlePrev, formOptions } = useContext(WizardContext); return {() => (
)}
; }; CustomButtons.propTypes = { buttonLabels: PropTypes.shape({ cancel: PropTypes.node, submit: PropTypes.node, back: PropTypes.node, }), isSaving: PropTypes.bool }; export default CustomButtons;