25 lines
546 B
TypeScript
25 lines
546 B
TypeScript
import React from "react";
|
|
|
|
import RoundedContainer from "./RoundedContainer";
|
|
|
|
export default function Form({
|
|
action,
|
|
children,
|
|
submitText,
|
|
}: {
|
|
// eslint-disable-next-line no-unused-vars
|
|
action?: string | ((formData: FormData) => void | Promise<void>);
|
|
children: React.ReactNode;
|
|
submitText: string;
|
|
}) {
|
|
return (
|
|
<div>
|
|
<form action={action}>
|
|
<RoundedContainer slim={false}>
|
|
{children}
|
|
<button type="submit">{submitText}</button>
|
|
</RoundedContainer>
|
|
</form>
|
|
</div>
|
|
);
|
|
}
|