wip: implement bookmark preview

This commit is contained in:
2025-05-08 15:51:17 +01:00
parent 77cb38294c
commit 9b47b806d5
10 changed files with 164 additions and 58 deletions

View File

@@ -17,7 +17,7 @@ function DialogTitle({ children }: React.PropsWithChildren) {
}
function DialogBody({ children }: React.PropsWithChildren) {
return <div className="m-8 w-full text-center">{children}</div>
return <div className="p-8 w-full text-center">{children}</div>
}
function DialogActionRow({ children }: React.PropsWithChildren) {

View File

@@ -9,17 +9,31 @@ interface FormFieldProps {
className?: string
labelClassName?: string
required?: boolean
autoFocus?: boolean
ref?: React.Ref<HTMLInputElement>
}
function FormField({ name, label, type, className, labelClassName, required = false }: FormFieldProps) {
function FormField({
name,
label,
type,
className,
labelClassName,
required = false,
autoFocus = false,
ref,
}: FormFieldProps) {
const id = useId()
return (
<div className={clsx("flex flex-col-reverse focus:text-teal-600", className)}>
<input
ref={ref}
id={id}
required={required}
name={name}
type={type}
// biome-ignore lint/a11y/noAutofocus: <explanation>
autoFocus={autoFocus}
defaultValue=""
className="peer px-3 pb-2 pt-3 border focus:border-2 border-stone-800 dark:border-stone-200 focus:border-teal-600 focus:ring-0 focus:outline-none"
/>