feat(admission): add scheduled group access
This commit is contained in:
@@ -29,6 +29,7 @@ export function AdminModalForm({
|
||||
const titleId = useId();
|
||||
const descriptionId = useId();
|
||||
const [submitting, setSubmitting] = useState(false);
|
||||
const [dialogGeneration, setDialogGeneration] = useState(0);
|
||||
return (
|
||||
<>
|
||||
<button
|
||||
@@ -36,7 +37,10 @@ export function AdminModalForm({
|
||||
aria-pressed={triggerPressed}
|
||||
className={triggerClassName ?? "font-mono text-[10px] font-bold uppercase underline underline-offset-4"}
|
||||
disabled={submitting}
|
||||
onClick={() => dialogRef.current?.showModal()}
|
||||
onClick={() => {
|
||||
setDialogGeneration((generation) => generation + 1);
|
||||
dialogRef.current?.showModal();
|
||||
}}
|
||||
type="button"
|
||||
>
|
||||
{triggerLabel}
|
||||
@@ -44,7 +48,7 @@ export function AdminModalForm({
|
||||
<dialog
|
||||
aria-describedby={descriptionId}
|
||||
aria-labelledby={titleId}
|
||||
className="admin-modal m-auto w-[min(92vw,36rem)] border border-ink bg-panel p-0 text-ink shadow-[10px_10px_0_var(--color-shadow)] backdrop:bg-ink/70"
|
||||
className="admin-modal m-auto max-h-[90vh] w-[min(92vw,36rem)] overflow-y-auto border border-ink bg-panel p-0 text-ink shadow-[10px_10px_0_var(--color-shadow)] backdrop:bg-ink/70"
|
||||
onCancel={(event) => { if (submitting) event.preventDefault(); }}
|
||||
ref={dialogRef}
|
||||
>
|
||||
@@ -52,7 +56,7 @@ export function AdminModalForm({
|
||||
<p className="font-mono text-[9px] font-bold uppercase tracking-[0.2em] text-accent">Confirm operation</p>
|
||||
<h2 className="mt-3 font-display text-3xl font-black uppercase" id={titleId}>{title}</h2>
|
||||
<p className="mt-3 text-sm leading-6 text-muted" id={descriptionId}>{description}</p>
|
||||
{children && <div className="mt-6">{children}</div>}
|
||||
{children && <div className="mt-6" key={dialogGeneration}>{children}</div>}
|
||||
<ModalActions dialogRef={dialogRef} intent={intent} onPendingChange={setSubmitting} submitLabel={submitLabel} />
|
||||
</form>
|
||||
</dialog>
|
||||
|
||||
Reference in New Issue
Block a user