import { FormContextType , useFormContext } from "./FormContext" ; import { omitProps } from "../../shared" ; export type FormButtonProps = Omit < FormContextType , "fluid" > ; export function useFormButton ( ) { const [ context , isInForm ] = useFormContext ( ) ; return [ omitProps ( context , [ "fluid" ] ) , isInForm ] ; }