Skip to content

Commit

Permalink
feat: add closing buttons "x"
Browse files Browse the repository at this point in the history
  • Loading branch information
BRaimbault committed Dec 13, 2024
1 parent 9f4ad67 commit 07dd32f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/components/edit/LayerEdit.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,12 @@ const LayerEdit = ({ layer, addLayer, updateLayer, cancelLayer }) => {
: i18n.t('Add new {{name}} layer', { name })

return (
<Modal position="middle" dataTest="layeredit" large>
<Modal
position="middle"
dataTest="layeredit"
large
onClose={cancelLayer}
>
<ModalTitle>{title}</ModalTitle>
<ModalContent>
<div className={styles.content}>
Expand Down
9 changes: 7 additions & 2 deletions src/components/layerSources/ManageLayerSourcesModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ const ManageLayerSourcesModal = ({ onClose }) => {
useKeyDown('Escape', onClose)

return (
<Modal large position="middle" dataTest="managelayersourcesmodal">
<Modal
onClose={onClose}
large
position="middle"
dataTest="managelayersourcesmodal"
>
<ModalTitle dataTest="managelayersourcesmodal-title">
{i18n.t('Configure available layer sources')}
</ModalTitle>
Expand All @@ -54,7 +59,7 @@ const ManageLayerSourcesModal = ({ onClose }) => {
<Button
dataTest="managelayersourcesmodal-button"
secondary
onClick={() => onClose()}
onClick={onClose}
>
{i18n.t('Close')}
</Button>
Expand Down

0 comments on commit 07dd32f

Please sign in to comment.