diff --git a/frontend/src/components/RelayForm.tsx b/frontend/src/components/RelayForm.tsx new file mode 100644 index 0000000..474927c --- /dev/null +++ b/frontend/src/components/RelayForm.tsx @@ -0,0 +1,86 @@ +type RelayFormProps = { + name: string + setName: (value: string) => void + subdomain: string + setSubdomain: (value: string) => void + icon: string + setIcon: (value: string) => void + description: string + setDescription: (value: string) => void + plan: string + setPlan: (value: string) => void + plans: readonly string[] + onSubmit: (e: Event) => void + submitting: boolean + error?: string + submitLabel: string + submittingLabel: string +} + +export default function RelayForm(props: RelayFormProps) { + return ( +
+
+ + props.setName(e.currentTarget.value)} + required + class="w-full border border-gray-300 rounded-lg px-3 py-2" + /> +
+
+ +
+ props.setSubdomain(e.currentTarget.value)} + required + class="flex-1 px-3 py-2" + /> + .spaces.coracle.social +
+
+
+ + props.setIcon(e.currentTarget.value)} + class="w-full border border-gray-300 rounded-lg px-3 py-2" + /> +
+
+ +