feat: X button and escape now setIsEditing(false)

This commit is contained in:
benalleng
2023-06-16 16:35:34 -04:00
committed by Paul Miller
parent 6765a59c4a
commit 97d9d9969e
2 changed files with 12 additions and 5 deletions

View File

@@ -51,12 +51,18 @@ export function ContactViewer(props: {
<div class={DIALOG_POSITIONER}>
<Dialog.Content
class={DIALOG_CONTENT}
onEscapeKeyDown={() => setIsOpen(false)}
onEscapeKeyDown={() => {
setIsOpen(false);
setIsEditing(false);
}}
>
<div class="w-full flex justify-end">
<button
tabindex="-1"
onClick={() => setIsOpen(false)}
onClick={() => {
setIsOpen(false);
setIsEditing(false);
}}
class="hover:bg-white/10 rounded-lg active:bg-m-blue"
>
<img src={close} alt="Close" />

View File

@@ -1,5 +1,5 @@
import {Button, InnerCard, NiceP, VStack} from "~/components/layout";
import {useMegaStore} from "~/state/megaStore";
import { Button, InnerCard, NiceP, VStack } from "~/components/layout";
import { useMegaStore } from "~/state/megaStore";
export function ResyncOnchain() {
const [state, _] = useMegaStore();
@@ -16,7 +16,8 @@ export function ResyncOnchain() {
<InnerCard>
<VStack>
<NiceP>
On-chain balance seems incorrect? Try re-syncing the on-chain wallet.
On-chain balance seems incorrect? Try re-syncing the
on-chain wallet.
</NiceP>
<Button intent="red" onClick={reset}>
Resync wallet