Skip to content

Commit 61f1fea

Browse files
committed
style: change button layout
- put all buttons below the URL - rename: Reset -> Delete - rename: Fetch URL -> Import from URL
1 parent 18f706a commit 61f1fea

File tree

1 file changed

+20
-22
lines changed

1 file changed

+20
-22
lines changed

components/hypercert/hypercert-minting-form/form-steps.tsx

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -654,25 +654,12 @@ const AdvancedAndSubmit = ({ form, isBlueprint }: FormStepsProps) => {
654654
name="allowlistURL"
655655
render={({ field }) => (
656656
<FormItem>
657-
<div className="flex items-center gap-2 justify-between">
658-
<div className="flex flex-row items-center gap-2">
659-
<FormLabel>Allowlist (optional)</FormLabel>
660-
<TooltipInfo
661-
tooltipText="Allowlists determine the number of units each address is allowed to mint. You can create a new allowlist, or prefill from an existing, already uploaded file."
662-
className="w-4 h-4"
663-
/>
664-
</div>
665-
<Button
666-
type="button"
667-
variant="outline"
668-
size="sm"
669-
disabled={
670-
(form.getValues("allowlistEntries")?.length ?? 0) > 0
671-
}
672-
onClick={() => fetchAllowlist(field?.value as string)}
673-
>
674-
Fetch URL
675-
</Button>
657+
<div className="flex flex-row items-center gap-2">
658+
<FormLabel>Allowlist (optional)</FormLabel>
659+
<TooltipInfo
660+
tooltipText="Allowlists determine the number of units each address is allowed to mint. You can create a new allowlist, or prefill from an existing, already uploaded file."
661+
className="w-4 h-4"
662+
/>
676663
</div>
677664
<FormControl>
678665
<Input
@@ -687,6 +674,17 @@ const AdvancedAndSubmit = ({ form, isBlueprint }: FormStepsProps) => {
687674
allowlist.
688675
</FormDescription>
689676
<div className="flex text-xs space-x-2 w-full justify-end">
677+
<Button
678+
type="button"
679+
variant="outline"
680+
disabled={
681+
(form.getValues("allowlistEntries")?.length ?? 0) > 0 ||
682+
!field.value
683+
}
684+
onClick={() => fetchAllowlist(field?.value as string)}
685+
>
686+
Import from URL
687+
</Button>
690688
<Button
691689
type="button"
692690
disabled={isPendingValidateAllowlist}
@@ -698,10 +696,10 @@ const AdvancedAndSubmit = ({ form, isBlueprint }: FormStepsProps) => {
698696
<LoaderCircle className="h-4 w-4 animate-spin mr-2" />
699697
Loading...
700698
</>
701-
) : allowlistEntries ? (
699+
) : allowlistEntries || field.value ? (
702700
"Edit allowlist"
703701
) : (
704-
"Create allowlist"
702+
"New allowlist"
705703
)}
706704
</Button>
707705

@@ -717,7 +715,7 @@ const AdvancedAndSubmit = ({ form, isBlueprint }: FormStepsProps) => {
717715
}}
718716
>
719717
<Trash2Icon className="w-4 h-4 mr-2" />
720-
Reset
718+
Delete
721719
</Button>
722720

723721
<CreateAllowlistDialog

0 commit comments

Comments
 (0)