@trustless-work/blocks 1.1.5 → 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/templates/escrows/load-escrow/form/LoadEscrow.tsx +48 -0
- package/templates/escrows/load-escrow/form/LoadEscrowForm.tsx +0 -47
- /package/templates/escrows/load-escrow/button/{LoadEscrowButton.tsx → LoadEscrow.tsx} +0 -0
- /package/templates/escrows/load-escrow/dialog/{LoadEscrowDialog.tsx → LoadEscrow.tsx} +0 -0
package/package.json
CHANGED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { Button } from "__UI_BASE__/button";
|
|
4
|
+
import { Input } from "__UI_BASE__/input";
|
|
5
|
+
import {
|
|
6
|
+
Form,
|
|
7
|
+
FormField,
|
|
8
|
+
FormItem,
|
|
9
|
+
FormLabel,
|
|
10
|
+
FormControl,
|
|
11
|
+
FormMessage,
|
|
12
|
+
} from "__UI_BASE__/form";
|
|
13
|
+
import { useLoadEscrow } from "./useLoadEscrow";
|
|
14
|
+
|
|
15
|
+
export function LoadEscrowForm() {
|
|
16
|
+
const { form, isSubmitting, onSubmit } = useLoadEscrow();
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<Form {...form}>
|
|
20
|
+
<form
|
|
21
|
+
onSubmit={form.handleSubmit(onSubmit)}
|
|
22
|
+
className="flex flex-col space-y-6 w-full"
|
|
23
|
+
>
|
|
24
|
+
<FormField
|
|
25
|
+
control={form.control}
|
|
26
|
+
name="contractIds.0.value"
|
|
27
|
+
render={({ field }) => (
|
|
28
|
+
<FormItem>
|
|
29
|
+
<FormLabel>Contract / Escrow ID</FormLabel>
|
|
30
|
+
<FormControl>
|
|
31
|
+
<Input placeholder="CAZ6UQX7..." {...field} />
|
|
32
|
+
</FormControl>
|
|
33
|
+
<FormMessage />
|
|
34
|
+
</FormItem>
|
|
35
|
+
)}
|
|
36
|
+
/>
|
|
37
|
+
|
|
38
|
+
<Button
|
|
39
|
+
type="submit"
|
|
40
|
+
className="w-full cursor-pointer"
|
|
41
|
+
disabled={isSubmitting}
|
|
42
|
+
>
|
|
43
|
+
{isSubmitting ? "Loading..." : "Load Escrow"}
|
|
44
|
+
</Button>
|
|
45
|
+
</form>
|
|
46
|
+
</Form>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { Button } from "__UI_BASE__/button";
|
|
4
|
-
import { Input } from "__UI_BASE__/input";
|
|
5
|
-
import {
|
|
6
|
-
Form,
|
|
7
|
-
FormField,
|
|
8
|
-
FormItem,
|
|
9
|
-
FormLabel,
|
|
10
|
-
FormControl,
|
|
11
|
-
FormMessage,
|
|
12
|
-
} from "__UI_BASE__/form";
|
|
13
|
-
import { useLoadEscrow } from "./useLoadEscrow";
|
|
14
|
-
|
|
15
|
-
export function LoadEscrowForm() {
|
|
16
|
-
const { form, isSubmitting, onSubmit } = useLoadEscrow();
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<div className="space-y-6">
|
|
20
|
-
<Form {...form}>
|
|
21
|
-
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-4">
|
|
22
|
-
<FormField
|
|
23
|
-
control={form.control}
|
|
24
|
-
name="contractIds.0.value"
|
|
25
|
-
render={({ field }) => (
|
|
26
|
-
<FormItem>
|
|
27
|
-
<FormLabel>Contract / Escrow ID</FormLabel>
|
|
28
|
-
<FormControl>
|
|
29
|
-
<Input placeholder="CAZ6UQX7..." {...field} />
|
|
30
|
-
</FormControl>
|
|
31
|
-
<FormMessage />
|
|
32
|
-
</FormItem>
|
|
33
|
-
)}
|
|
34
|
-
/>
|
|
35
|
-
|
|
36
|
-
<Button
|
|
37
|
-
type="submit"
|
|
38
|
-
className="w-full cursor-pointer"
|
|
39
|
-
disabled={isSubmitting}
|
|
40
|
-
>
|
|
41
|
-
{isSubmitting ? "Loading..." : "Load Escrow"}
|
|
42
|
-
</Button>
|
|
43
|
-
</form>
|
|
44
|
-
</Form>
|
|
45
|
-
</div>
|
|
46
|
-
);
|
|
47
|
-
}
|
|
File without changes
|
|
File without changes
|