@overmap-ai/core 1.0.38-component-fields.24 → 1.0.38-component-fields.26

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.
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { ISchema } from "../../fields";
3
3
  import { Form } from "../../typings";
4
+ import { ButtonProps } from "@overmap-ai/blocks/dist/Buttons/typings";
4
5
  interface FormRendererProps {
5
6
  /** The schema of the form the render */
6
7
  schema: ISchema;
@@ -24,6 +25,7 @@ interface FormRendererProps {
24
25
  */
25
26
  hideTitle?: boolean;
26
27
  className?: string;
28
+ buttonProps?: Omit<ButtonProps, "children">;
27
29
  }
28
30
  export declare const FormRenderer: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<FormRendererProps & import("react").RefAttributes<HTMLDivElement>>>;
29
31
  export {};
@@ -10349,11 +10349,11 @@ const FormRenderer = memo(
10349
10349
  // if the title isn't provided, hide it by default
10350
10350
  hideTitle = !schema.title,
10351
10351
  hideDescription,
10352
- className
10352
+ className,
10353
+ buttonProps
10353
10354
  } = props;
10354
10355
  const { readonly } = schema.meta;
10355
10356
  const formId2 = useMemo(() => crypto.randomUUID(), []);
10356
- console.log(initialFormValues(schema.fields, values));
10357
10357
  const formik = useFormik({
10358
10358
  initialValues: initialFormValues(schema.fields, values),
10359
10359
  onSubmit,
@@ -10385,8 +10385,8 @@ const FormRenderer = memo(
10385
10385
  ] }) }),
10386
10386
  inputs,
10387
10387
  !readonly && /* @__PURE__ */ jsxs(Flex, { className: styles$6.floatingButtonContainer, align: "center", justify: "end", gap: "2", children: [
10388
- cancelText && /* @__PURE__ */ jsx(Button, { type: "button", variant: "solid", severity: "info", onClick: onCancel, children: cancelText }),
10389
- /* @__PURE__ */ jsx(Button, { type: "submit", disabled: !formik.isValid, children: submitText })
10388
+ cancelText && /* @__PURE__ */ jsx(Button, { severity: "info", ...buttonProps, type: "button", onClick: onCancel, children: cancelText }),
10389
+ /* @__PURE__ */ jsx(Button, { ...buttonProps, type: "submit", disabled: !formik.isValid, children: submitText })
10390
10390
  ] })
10391
10391
  ] }) }) });
10392
10392
  })