diff --git a/.gitignore b/.gitignore index e30232e3..7e293758 100644 --- a/.gitignore +++ b/.gitignore @@ -64,3 +64,4 @@ public # Cookie cutter dist/ .idea +.vscode diff --git a/src/components/course-enrollments/CourseEnrollments.jsx b/src/components/course-enrollments/CourseEnrollments.jsx index 42095745..548b75f5 100644 --- a/src/components/course-enrollments/CourseEnrollments.jsx +++ b/src/components/course-enrollments/CourseEnrollments.jsx @@ -1,10 +1,9 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; -import { breakpoints, StatusAlert } from '@edx/paragon'; +import { breakpoints, Alert } from '@edx/paragon'; +import { Warning, CheckCircle } from '@edx/paragon/icons'; import { AppContext } from '@edx/frontend-platform/react'; -import { faExclamationTriangle, faCheckCircle } from '@fortawesome/free-solid-svg-icons'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import MediaQuery from 'react-responsive'; import { LoadingSpinner } from '../loading-spinner'; @@ -50,43 +49,34 @@ export class CourseEnrollments extends Component { ); renderError = () => ( - -
- -
-
- An error occurred while retrieving your course enrollments. Please try again. -
- - )} + + icon={Warning} + show + > +
+ An error occurred while retrieving your course enrollments. Please try again. +
+
); renderMarkCourseCompleteSuccessAlert = () => { const { modifyIsMarkCourseCompleteSuccess } = this.props; return ( - -
- -
-
- Your course was marked as complete. -
- - )} + { modifyIsMarkCourseCompleteSuccess({ isSuccess: false }); }} - open - /> + show + dismissible + > +
+ Your course was marked as complete. +
+
); }; diff --git a/src/components/course-enrollments/course-cards/email-settings/EmailSettingsModal.jsx b/src/components/course-enrollments/course-cards/email-settings/EmailSettingsModal.jsx index 4c333305..84c2e375 100644 --- a/src/components/course-enrollments/course-cards/email-settings/EmailSettingsModal.jsx +++ b/src/components/course-enrollments/course-cards/email-settings/EmailSettingsModal.jsx @@ -2,10 +2,9 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import { - Input, Modal, StatusAlert, StatefulButton, + Input, Modal, Alert, StatefulButton, } from '@edx/paragon'; -import { faExclamationTriangle } from '@fortawesome/free-solid-svg-icons'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { Warning } from '@edx/paragon/icons'; import { updateEmailSettings } from './data'; @@ -120,25 +119,14 @@ class EmailSettingsModal extends Component { body={( <> {error && ( - -
- -
-
- An error occurred while saving your email settings. Please - try again. -
- - )} + + icon={Warning} + show + > + An error occurred while saving your email settings. Please try again. + )}
', () => { /> )); - wrapper.find('.alert .btn.close').simulate('click'); + wrapper.find('.alert-success .btn').simulate('click'); expect(mockModifyIsMarkCourseCompleteSuccess).toBeCalledTimes(1); }); }); diff --git a/src/components/course-enrollments/tests/__snapshots__/CourseEnrollments.test.jsx.snap b/src/components/course-enrollments/tests/__snapshots__/CourseEnrollments.test.jsx.snap index 6322c67a..65528ae3 100644 --- a/src/components/course-enrollments/tests/__snapshots__/CourseEnrollments.test.jsx.snap +++ b/src/components/course-enrollments/tests/__snapshots__/CourseEnrollments.test.jsx.snap @@ -2,36 +2,37 @@ exports[` renders course enrollments correctly with error 1`] = `