Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

InvoiceFields.tsx

34 lines797 Bytes

1import * as React from 'react'
2import type { Invoice } from '../utils/mockTodos'
3​
4export function InvoiceFields({
5 invoice,
6 disabled,
7}: {
8 invoice: Invoice
9 disabled?: boolean
10}) {
11 return (
12 <div className="space-y-2">
13 <h2 className="font-bold text-lg">
14 <input
15 name="title"
16 defaultValue={invoice.title}
17 placeholder="Invoice Title"
18 className="border border-opacity-50 rounded-sm p-2 w-full"
19 disabled={disabled}
20 />
21 </h2>
22 <div>
23 <textarea
24 name="body"
25 defaultValue={invoice.body}
26 rows={6}
27 placeholder="Invoice Body..."
28 className="border border-opacity-50 p-2 rounded-sm w-full"
29 disabled={disabled}
30 />
31 </div>
32 </div>
33 )