Fixes the copy on new sessions, some additional styling work

This commit is contained in:
2025-06-28 17:48:56 -07:00
parent c00eb1d965
commit 6ce462a77d
20 changed files with 268 additions and 91 deletions

View File

@@ -1,4 +1,4 @@
import type { Document, DocumentId } from "@/lib/types";
import type { AnyDocument, DocumentId } from "@/lib/types";
import {
Dialog,
DialogPanel,
@@ -9,7 +9,7 @@ import {
import { Fragment, useCallback, useState } from "react";
import * as Icons from "@/components/Icons.tsx";
type Props<T extends Document> = {
type Props<T extends AnyDocument> = {
title: React.ReactNode;
error?: React.ReactNode;
items: T[];
@@ -26,7 +26,7 @@ type Props<T extends Document> = {
* @param renderRow - Function to render each row's content
* @param newItemForm - Function that renders a form for creating a new item; receives an onSubmit callback
*/
export function DocumentList<T extends Document>({
export function DocumentList<T extends AnyDocument>({
title,
error,
items,
@@ -122,9 +122,6 @@ export function DocumentList<T extends Document>({
leaveTo="opacity-0 scale-95"
>
<DialogPanel className="bg-slate-900 rounded-lg shadow-xl max-w-md w-full p-6 border border-slate-700 relative">
<DialogTitle className="text-lg font-semibold text-slate-100 mb-4">
Add New
</DialogTitle>
{newItemForm(handleFormSubmit)}
<button
type="button"