Fixes the copy on new sessions, some additional styling work
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user