import type { StringLike } from "@ariakit/core/form/types"; import type { ElementType } from "react"; import type { ButtonOptions } from "../button/button.tsx"; import type { CollectionItemOptions } from "../collection/collection-item.tsx"; import type { Props } from "../utils/types.ts"; import type { FormStore } from "./form-store.ts"; declare const TagName = "button"; type TagName = typeof TagName; /** * Returns props to create a `FormPush` component. * @see https://ariakit.com/components/form * @example * ```jsx * const store = useFormStore({ * defaultValues: { * languages: ["JavaScript", "PHP"], * }, * }); * const props = useFormPush({ * store, * name: store.names.languages, * value: "", * }); * const values = useStoreState(store, "values"); * *
* ``` */ export declare const useFormPush: import("../utils/types.ts").Hook<"button", FormPushOptions<"button">>; /** * Renders a button that will push items to an array value in the form store * when clicked. * * The [`name`](https://ariakit.com/reference/form-push#name) prop needs to be * provided to identify the array field. The * [`value`](https://ariakit.com/reference/form-push#value) prop is required to * define the value that will be added to the array. * * By default, the newly added input will be automatically focused when the * button is clicked unless the * [`autoFocusOnClick`](https://ariakit.com/reference/form-push#autofocusonclick) * prop is set to `false`. * @see https://ariakit.com/components/form * @example * ```jsx {13-15} * const form = useFormStore({ * defaultValues: { * languages: ["JavaScript", "PHP"], * }, * }); * * const values = useStoreState(form, "values"); * * * ``` */ export declare const FormPush: (props: FormPushProps) => import("react").ReactElement