Skip to content

Commit a189375

Browse files
authored
fix: legal notices dismisses on click anywhere (#1452)
Modal shouldn't be nested inside the button, messes up click handling and makes the modal dismiss on a click anywhere.
1 parent 5cc2936 commit a189375

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

packages/code-studio/src/settings/LegalNotice.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ function LegalNotice(): ReactElement {
99
};
1010

1111
return (
12-
<Button kind="ghost" onClick={toggle} icon={vsLaw}>
13-
Legal Notices
12+
<>
13+
<Button kind="ghost" onClick={toggle} icon={vsLaw}>
14+
Legal Notices
15+
</Button>
1416
<Modal isOpen={modal} toggle={toggle} className="theme-bg-light">
1517
<ModalHeader toggle={toggle}>Legal Notice</ModalHeader>
1618
<ModalBody>
@@ -35,7 +37,7 @@ function LegalNotice(): ReactElement {
3537
</p>
3638
</ModalBody>
3739
</Modal>
38-
</Button>
40+
</>
3941
);
4042
}
4143

0 commit comments

Comments
 (0)