feat: add public share options for workflow

This commit is contained in:
BennyKok
2024-01-14 23:35:25 +08:00
parent dafc8b168b
commit 18cfbce171
22 changed files with 1327 additions and 158 deletions
+12 -2
View File
@@ -13,8 +13,18 @@ import type { DefaultValues } from "react-hook-form";
import { useForm } from "react-hook-form";
import type { z } from "zod";
export function AutoFormSubmit({ children }: { children?: React.ReactNode }) {
return <Button type="submit">{children ?? "Submit"}</Button>;
export function AutoFormSubmit({
children,
disabled,
}: {
children?: React.ReactNode;
disabled?: boolean;
}) {
return (
<Button type="submit" disabled={disabled}>
{children ?? "Submit"}
</Button>
);
}
function AutoForm<SchemaType extends ZodObjectOrWrapped>({