Skip to content

Commit

Permalink
fix passage clicking to close
Browse files Browse the repository at this point in the history
  • Loading branch information
yaozhiwang committed Apr 23, 2023
1 parent 2f93330 commit 983c36d
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/contents/passage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,14 @@ const PassageInline = (props: { anchor: PlasmoCSUIAnchor }) => {
className={classNames("h-full", theme == Theme.Dark ? "dark" : "")}>
<details
className="group/collaps relative mb-2 mt-2 overflow-hidden rounded-lg border border-neutral-200 bg-white text-black duration-300 open:w-full dark:border-neutral-500 dark:bg-neutral-900 dark:text-white"
open={open}
onClick={(e) => {
setOpen((open) => !open)
e.stopPropagation()
e.preventDefault()
}}>
<summary className="flex cursor-row-resize items-center justify-between gap-0 bg-neutral-200 p-1 dark:bg-neutral-800">
open={open}>
<summary
className="flex cursor-row-resize items-center justify-between gap-0 bg-neutral-200 p-1 dark:bg-neutral-800"
onClick={(e) => {
setOpen((open) => !open)
e.stopPropagation()
e.preventDefault()
}}>
<div>
<div className="flex flex-row group-open/collaps:hidden">
<ToggleButton
Expand Down

0 comments on commit 983c36d

Please sign in to comment.