@adobe/react-spectrum-charts
Version:
Declarative library for composing Spectrum visualizations in React.
16 lines • 665 B
TypeScript
import { ArgsStoryFn } from '@storybook/csf';
import { ReactRenderer, StoryFn } from '@storybook/react';
type StoryArgsTypes<T> = T extends ArgsStoryFn<ReactRenderer, infer Return> ? Return : T;
type RequiredProps<T> = StoryFn<T> & {
args: T;
};
/**
* Will make the props in a story required (by default Storybook makes all props optional).
* Useful for testing a component with props.
*
* Usage: `const CustomStory = bindWithProps(TemplateStory);`
* @param template: Story to bind.
*/
declare function bindWithProps<T>(template: StoryFn<T>): RequiredProps<StoryArgsTypes<StoryFn<T>>>;
export { bindWithProps };
//# sourceMappingURL=bindWithProps.d.ts.map