feat: first draft

This commit is contained in:
2025-01-25 20:39:55 +01:00
parent 78c69dbc1a
commit 06fbbab24d
53 changed files with 13416 additions and 123 deletions

View File

@@ -0,0 +1,32 @@
import { Input } from '@components/ui/input';
import { Button } from '@components/ui/button';
import { X } from 'lucide-react';
export function EditableList({
items,
onAdd,
onRemove,
onUpdate,
}: {
items: string[];
onAdd: () => void;
onRemove: (index: number) => void;
onUpdate: (index: number, value: string) => void;
}) {
return (
<div className="space-y-2">
{items.map((item, index) => (
<div key={index} className="flex gap-2">
<Input
value={item}
onChange={(e) => onUpdate(index, e.target.value)}
/>
<Button variant="ghost" size="icon" onClick={() => onRemove(index)}>
<X className="h-4 w-4" />
</Button>
</div>
))}
<Button onClick={onAdd}>Add</Button>
</div>
);
}