UNPKG

storybook-formik

Version:

A storybook addon that allows you to use components in your stories that rely on Formik context and see internal Formik state in a panel.

17 lines (16 loc) 715 B
import { FormikConfig } from 'formik'; export declare const ADDON_ID = "storybookjs/formik"; export declare const PANEL_ID: string; export declare const PARAM_KEY = "formik"; export declare const EVT_RENDER = "formik/render"; export declare const EVT_SUBMIT = "formik/submit"; export declare const EVT_ON_SUBMIT = "formik/on-submit"; declare type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>; export declare type ConfigWithoutExtra<Values = any> = PartialBy<Omit<FormikConfig<Values>, 'initialValues'> & { castValues?: boolean; initialValues?: Values; }, 'onSubmit' | 'castValues'>; export interface DecoratorParams<Values = any> { formik: ConfigWithoutExtra<Values>; } export {};