close thread spotlight on bg click
Some checks are pending
continuous-integration/drone/push Build is running
Some checks are pending
continuous-integration/drone/push Build is running
This commit is contained in:
parent
d20543d7a3
commit
ae1b762771
@ -9,12 +9,17 @@ import { NostrLink } from "@snort/system";
|
|||||||
export function SpotlightThreadModal(props: { thread: NostrLink; onClose?: () => void; onBack?: () => void }) {
|
export function SpotlightThreadModal(props: { thread: NostrLink; onClose?: () => void; onBack?: () => void }) {
|
||||||
const onClose = () => props.onClose?.();
|
const onClose = () => props.onClose?.();
|
||||||
const onBack = () => props.onBack?.();
|
const onBack = () => props.onBack?.();
|
||||||
|
const onClickBg = (e: React.MouseEvent) => {
|
||||||
|
if (e.target === e.currentTarget) {
|
||||||
|
onClose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal id="thread-overlay" onClose={onClose} bodyClassName={"flex flex-1"}>
|
<Modal id="thread-overlay" onClose={onClose} bodyClassName={"flex flex-1"}>
|
||||||
<ThreadContextWrapper link={props.thread}>
|
<ThreadContextWrapper link={props.thread}>
|
||||||
<div className="flex flex-row h-screen w-screen">
|
<div className="flex flex-row h-screen w-screen">
|
||||||
<div className="flex w-full md:w-2/3 items-center justify-center overflow-hidden">
|
<div className="flex w-full md:w-2/3 items-center justify-center overflow-hidden" onClick={onClickBg}>
|
||||||
<SpotlightFromThread onClose={onClose} />
|
<SpotlightFromThread onClose={onClose} />
|
||||||
</div>
|
</div>
|
||||||
<div className="hidden md:flex w-1/3 min-w-[400px] flex-shrink-0 overflow-y-auto bg-bg-color">
|
<div className="hidden md:flex w-1/3 min-w-[400px] flex-shrink-0 overflow-y-auto bg-bg-color">
|
||||||
|
Loading…
Reference in New Issue
Block a user