import * as React from "react"; export interface AuthenticityTokenProviderProps { children: React.ReactNode; token: string; } export interface AuthenticityTokenInputProps { name?: string; } /** * Save the Authenticity Token into context * @example * // Add `` wrapping your Outlet * let { csrf } = useLoaderData(); * return ( * * * * ) */ export declare function AuthenticityTokenProvider({ children, token, }: AuthenticityTokenProviderProps): import("react/jsx-runtime").JSX.Element; /** * Get the authenticity token, this should be used to send it in a submit. * @example * let token = useAuthenticityToken(); * let submit = useSubmit(); * function sendFormWithCode() { * submit( * { csrf: token, ...otherData }, * { action: "/action", method: "post" }, * ); * } */ export declare function useAuthenticityToken(): string; /** * Render a hidden input with the name csrf and the authenticity token as value. * @example * // Default usage * return ( *
* * * * * * ); * @example * // Customizing the name * */ export declare function AuthenticityTokenInput({ name, }: AuthenticityTokenInputProps): import("react/jsx-runtime").JSX.Element;