tangled
alpha
login
or
join now
finxol.io
/
bookmarker
0
fork
atom
A very simple bookmarking webapp
bookmarker.finxol.deno.net/
0
fork
atom
overview
issues
pulls
pipelines
feat: add dialog
finxol.io
1 month ago
4d1711ca
5e0f4fcf
verified
This commit was signed with the committer's
known signature
.
finxol.io
SSH Key Fingerprint:
SHA256:olFE3asYdoBMScuJOt60UxXdJ0RFdGv5kVKrdOtIcPI=
+56
3 changed files
expand all
collapse all
unified
split
src
components
BookmarkEditModal.css
BookmarkEditModal.tsx
routes
index.tsx
+24
src/components/BookmarkEditModal.css
reviewed
···
1
1
+
.bookmark-edit-modal {
2
2
+
position: fixed;
3
3
+
inset: 0;
4
4
+
margin: auto;
5
5
+
width: min(90vw, 32rem);
6
6
+
max-height: min(80vh, 600px);
7
7
+
padding: 1.5rem;
8
8
+
border: none;
9
9
+
border-radius: 0.75rem;
10
10
+
background: var(--page-bg);
11
11
+
color: var(--primary-text);
12
12
+
flex-direction: column;
13
13
+
gap: 1rem;
14
14
+
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
15
15
+
16
16
+
&:popover-open {
17
17
+
display: flex;
18
18
+
}
19
19
+
20
20
+
&::backdrop {
21
21
+
background: rgba(0, 0, 0, 0.5);
22
22
+
backdrop-filter: blur(4px);
23
23
+
}
24
24
+
}
+28
src/components/BookmarkEditModal.tsx
reviewed
···
1
1
+
import { PencilIcon, XIcon } from "lucide-solid"
2
2
+
import "./BookmarkEditModal.css"
3
3
+
4
4
+
export function BookmarkEditModal(props: { id: string }) {
5
5
+
return (
6
6
+
<>
7
7
+
<button
8
8
+
type="button"
9
9
+
command="show-modal"
10
10
+
commandfor={`edit-${props.id}`}
11
11
+
class="bookmark-edit button-icon button-ghost"
12
12
+
>
13
13
+
<PencilIcon size={16} />
14
14
+
</button>
15
15
+
<dialog id={`edit-${props.id}`} class="bookmark-edit-modal">
16
16
+
<button
17
17
+
type="button"
18
18
+
commandfor={`edit-${props.id}`}
19
19
+
command="close"
20
20
+
class="button-ghost button-icon"
21
21
+
>
22
22
+
<XIcon size={16} />
23
23
+
</button>
24
24
+
Edit
25
25
+
</dialog>
26
26
+
</>
27
27
+
)
28
28
+
}
+4
src/routes/index.tsx
reviewed
···
11
11
} from "lucide-solid"
12
12
import "../components/ui/button.css"
13
13
import "./index.css"
14
14
+
import { BookmarkEditModal } from "../components/BookmarkEditModal.tsx"
14
15
15
16
export const Route = createFileRoute("/")({
16
17
component: Index,
···
153
154
>
154
155
<ExternalLinkIcon size={16} />
155
156
</a>
157
157
+
<BookmarkEditModal
158
158
+
id={String(bookmark.id)}
159
159
+
/>
156
160
<button
157
161
type="button"
158
162
class="button-icon button-ghost button-danger"