feat: add (non-working) edit page
This commit is contained in:
parent
15797b679c
commit
ca2cf9e06f
9 changed files with 140 additions and 11 deletions
|
@ -1,11 +1,15 @@
|
|||
import React, { PropsWithChildren } from "react";
|
||||
|
||||
export type Props = PropsWithChildren<{ title: string }>;
|
||||
export type Props = PropsWithChildren<{ title: string; draggable?: boolean }>;
|
||||
|
||||
export default function Card({ title, children }: Props) {
|
||||
export default function Card({ title, draggable, children }: Props) {
|
||||
return (
|
||||
<div className="bg-slate-100 dark:bg-slate-700 rounded-md shadow">
|
||||
<h1 className="text-2xl p-2 border-b border-zinc-200 dark:border-slate-800">
|
||||
<h1
|
||||
className={`text-2xl p-2 border-b border-zinc-200 dark:border-slate-800${
|
||||
draggable && " handle hover:cursor-grab"
|
||||
}`}
|
||||
>
|
||||
{title}
|
||||
</h1>
|
||||
<div className="flex flex-col p-2">{children}</div>
|
||||
|
|
|
@ -9,9 +9,15 @@ import {
|
|||
import Card from "./Card";
|
||||
import type { Field } from "./types";
|
||||
|
||||
export default function FieldCard({ field }: { field: Field }) {
|
||||
export default function FieldCard({
|
||||
field,
|
||||
draggable,
|
||||
}: {
|
||||
field: Field;
|
||||
draggable?: boolean;
|
||||
}) {
|
||||
return (
|
||||
<Card title={field.name}>
|
||||
<Card title={field.name} draggable={draggable}>
|
||||
{field.favourite.map((entry) => (
|
||||
<p className="text-lg font-bold">
|
||||
<HeartFill className="inline" /> {entry}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue