Skip to content

Commit

Permalink
fix: remove unnecessary label prop ariaLabelledby in SimpleTwoActions…
Browse files Browse the repository at this point in the history
…Dialog
  • Loading branch information
csm-thu committed Mar 17, 2022
1 parent d1cda53 commit 8ba15d5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/dialogs/SimpleTwoActionsDialog/SimpleTwoActionsDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const SimpleTwoActionsDialog = ({ id, open, labels, handleClickOnButton1,
};

return (
<Dialog open={open} aria-labelledby={labels.ariaLabelledby} maxWidth={'xs'} fullWidth={true} onClose={onClose}>
<Dialog open={open} aria-labelledby={id + '-dialog-title'} maxWidth={'xs'} fullWidth={true} onClose={onClose}>
<DialogTitle id={id + '-dialog-title'}>{labels.title}</DialogTitle>
<DialogContent>
<Typography variant="body1">{labels.body}</Typography>
Expand Down Expand Up @@ -50,7 +50,6 @@ SimpleTwoActionsDialog.propTypes = {
* body:'This is a body',
* button1: 'Action1',
* button2: 'Action2',
* ariaLabelledby: 'Wonderful dialog
*}
*</pre>
*/
Expand All @@ -59,7 +58,6 @@ SimpleTwoActionsDialog.propTypes = {
body: PropTypes.string.isRequired,
button1: PropTypes.string.isRequired,
button2: PropTypes.string.isRequired,
ariaLabelledby: PropTypes.string.isRequired,
}),
/**
* ## Function used when button1 is clicked
Expand Down Expand Up @@ -87,6 +85,5 @@ SimpleTwoActionsDialog.defaultProps = {
`,
button1: 'Cancel',
button2: 'Validate',
ariaLabelledby: 'simple-two-actions-dialog',
},
};

0 comments on commit 8ba15d5

Please sign in to comment.