🎨 formatting and fixing error

This commit is contained in:
MathieuDR 2025-05-11 00:48:45 +02:00
parent c0f80b6d61
commit ac1c0a24a2
No known key found for this signature in database
GPG Key ID: BB1B6AEC733F6F80
2 changed files with 4 additions and 7 deletions

View File

@ -1,11 +1,8 @@
import { JSX } from "preact" import { JSX } from "preact"
const OverflowList = ({ const OverflowList = ({ children, ...props }: JSX.HTMLAttributes<HTMLUListElement>) => {
children,
...props
}: JSX.HTMLAttributes<HTMLUListElement> & { id: string }) => {
return ( return (
<ul {...props} class={[props.class, "overflow"].filter(Boolean).join(" ")} id={props.id}> <ul {...props} class={[props.class, "overflow"].filter(Boolean).join(" ")}>
{children} {children}
<li class="overflow-end" /> <li class="overflow-end" />
</ul> </ul>
@ -34,7 +31,7 @@ document.addEventListener("nav", (e) => {
} }
}) })
const ul = document.querySelector("ul[data-list-number='${dataId}']") const ul = document.querySelector("ul[data-list-id='${dataId}']")
if (!ul) return if (!ul) return
const end = ul.querySelector(".overflow-end") const end = ul.querySelector(".overflow-end")