feat(react/dialogs): port prompt

This commit is contained in:
Elian Doran
2025-08-05 19:06:47 +03:00
parent b3c81ce5f2
commit bde4545afc
12 changed files with 117 additions and 132 deletions

View File

@@ -1,6 +1,7 @@
import { ComponentChildren } from "preact";
import { ComponentChildren, RefObject } from "preact";
interface FormGroupProps {
labelRef?: RefObject<HTMLLabelElement>;
label: string;
title?: string;
className?: string;
@@ -8,10 +9,10 @@ interface FormGroupProps {
description?: string;
}
export default function FormGroup({ label, title, className, children, description }: FormGroupProps) {
export default function FormGroup({ label, title, className, children, description, labelRef }: FormGroupProps) {
return (
<div className={`form-group ${className}`} title={title}>
<label style={{ width: "100%" }}>
<label style={{ width: "100%" }} ref={labelRef}>
{label}
{children}
</label>