diff --git a/src/components/ModalActions/index.jsx b/src/components/ModalActions/index.jsx new file mode 100644 index 00000000..edb348e6 --- /dev/null +++ b/src/components/ModalActions/index.jsx @@ -0,0 +1,45 @@ +import React from 'react'; +import PropTypes from 'prop-types'; + +import { Button, StatefulButton } from '@edx/paragon'; + +import { MutationStatus } from 'data/services/lms/constants'; +import { useCloseModal } from 'hooks'; + +const ModalActions = (props) => { + // const { secondary } = props; + const closeModal = useCloseModal(); + const { primary } = props; + const secondary = props.secondary && { + ...props.secondary, + onClick: closeModal, + }; + const className = 'w-100'; + const disabledStates = [MutationStatus.loading]; + console.log(props); + const genButton = (variant, btnProps) => (btnProps.state + ? + :