Skip to content

Commit

Permalink
Merge pull request #131 from edx/sajjad/VAN-2042
Browse files Browse the repository at this point in the history
fix: console errors and warnings
  • Loading branch information
syedsajjadkazmii committed Aug 20, 2024
2 parents 0764281 + 18af4bb commit a96f48c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
9 changes: 5 additions & 4 deletions src/base-container/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,17 @@ import './index.scss';
* @param {React.node} children - Required. The login or registration form.
* @param {boolean} hasCloseButton - Optional. Denotes whether modal should have close button or not.
* @param {string} size - Optional. Specifies size of modal.
* @param currentForm - Denotes the current opened form
*
* @returns {JSX.Element} The rendered login or registration form modal.
*/
const BaseContainer = ({
children,
children = null,
close,
hasCloseButton = true,
isOpen,
size = 'lg',
currentForm,
currentForm = null,
}) => {
const dispatch = useDispatch();

Expand Down Expand Up @@ -79,12 +80,12 @@ const BaseContainer = ({
};

BaseContainer.propTypes = {
children: PropTypes.node.isRequired,
children: PropTypes.node,
isOpen: PropTypes.bool.isRequired,
close: PropTypes.func.isRequired,
size: PropTypes.string,
hasCloseButton: PropTypes.bool,
currentForm: PropTypes.string.isRequired,
currentForm: PropTypes.string,
};

export default BaseContainer;
5 changes: 3 additions & 2 deletions src/forms/fields/marketing-email-opt-out-field/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';

import { useIntl } from '@edx/frontend-platform/i18n';
import { Form } from '@openedx/paragon';
import { CheckboxControl, Form } from '@openedx/paragon';
import classNames from 'classnames';
import PropTypes from 'prop-types';

Expand All @@ -23,7 +23,7 @@ const MarketingEmailOptInCheckbox = (props) => {

return (
<Form.Group controlId="marketingEmailsOptIn" className="mb-4">
<Form.Checkbox
<CheckboxControl
name={name}
className={classNames(
'text-gray-800',
Expand All @@ -33,6 +33,7 @@ const MarketingEmailOptInCheckbox = (props) => {
)}
checked={!!value}
onChange={handleChange}
aria-label="Checkbox"
/>
<Form.Label className="registration-form__marketing_opt-in-label">
{formatMessage(messages.registrationFormMarketingOptInLabel)}
Expand Down
1 change: 1 addition & 0 deletions src/forms/registration-popup/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@
.registration-form__marketing_opt-in-label {
display: inline-block;
vertical-align: middle;
pointer-events: none;
}

0 comments on commit a96f48c

Please sign in to comment.