Remove close label since MailPoet's modal has no such thing
[MAILPOET-2804]
This commit is contained in:
@@ -8,7 +8,6 @@ const ModalHeader = ({
|
|||||||
icon,
|
icon,
|
||||||
title,
|
title,
|
||||||
onClose,
|
onClose,
|
||||||
closeLabel,
|
|
||||||
headingId,
|
headingId,
|
||||||
isDismissible,
|
isDismissible,
|
||||||
}) => (
|
}) => (
|
||||||
@@ -32,7 +31,7 @@ const ModalHeader = ({
|
|||||||
) }
|
) }
|
||||||
</div>
|
</div>
|
||||||
{ isDismissible && (
|
{ isDismissible && (
|
||||||
<Button onClick={onClose} icon={closeIcon} label={closeLabel} className="mailpoet-modal-close" />
|
<Button onClick={onClose} icon={closeIcon} className="mailpoet-modal-close" />
|
||||||
) }
|
) }
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@@ -41,7 +40,6 @@ ModalHeader.propTypes = {
|
|||||||
title: PropTypes.string,
|
title: PropTypes.string,
|
||||||
headingId: PropTypes.string,
|
headingId: PropTypes.string,
|
||||||
onClose: PropTypes.func,
|
onClose: PropTypes.func,
|
||||||
closeLabel: PropTypes.string,
|
|
||||||
icon: PropTypes.node,
|
icon: PropTypes.node,
|
||||||
isDismissible: PropTypes.bool,
|
isDismissible: PropTypes.bool,
|
||||||
};
|
};
|
||||||
@@ -50,7 +48,6 @@ ModalHeader.defaultProps = {
|
|||||||
title: null,
|
title: null,
|
||||||
headingId: 'heading-id',
|
headingId: 'heading-id',
|
||||||
onClose: () => {},
|
onClose: () => {},
|
||||||
closeLabel: '',
|
|
||||||
icon: null,
|
icon: null,
|
||||||
isDismissible: true,
|
isDismissible: true,
|
||||||
};
|
};
|
||||||
|
@@ -9,7 +9,6 @@ function Modal({
|
|||||||
onRequestClose,
|
onRequestClose,
|
||||||
title,
|
title,
|
||||||
icon,
|
icon,
|
||||||
closeButtonLabel,
|
|
||||||
displayTitle,
|
displayTitle,
|
||||||
children,
|
children,
|
||||||
aria,
|
aria,
|
||||||
@@ -46,7 +45,6 @@ function Modal({
|
|||||||
{
|
{
|
||||||
displayTitle && (
|
displayTitle && (
|
||||||
<ModalHeader
|
<ModalHeader
|
||||||
closeLabel={closeButtonLabel}
|
|
||||||
headingId={headingId}
|
headingId={headingId}
|
||||||
icon={icon}
|
icon={icon}
|
||||||
isDismissible={isDismissible}
|
isDismissible={isDismissible}
|
||||||
@@ -63,7 +61,6 @@ function Modal({
|
|||||||
}
|
}
|
||||||
|
|
||||||
Modal.propTypes = {
|
Modal.propTypes = {
|
||||||
closeButtonLabel: PropTypes.string,
|
|
||||||
children: PropTypes.node,
|
children: PropTypes.node,
|
||||||
aria: PropTypes.shape({
|
aria: PropTypes.shape({
|
||||||
labelledby: PropTypes.string,
|
labelledby: PropTypes.string,
|
||||||
|
Reference in New Issue
Block a user