react-cookie-auth
Version:
Authentication library with HTTP-only cookies and Page Visibility API for handling sleep/wake cycles
50 lines (49 loc) • 3.75 kB
TypeScript
import React from 'react';
import type { StoryObj } from '@storybook/react';
import { Auth } from '../components/Auth';
type AuthStory = StoryObj<typeof Auth>;
export declare const UnauthenticatedState: AuthStory;
export declare const AuthenticatedState: AuthStory;
export declare const LoginSuccess: AuthStory;
export declare const LoginFailure: AuthStory;
export declare const LoginLoading: AuthStory;
export declare const LogoutSuccess: AuthStory;
export declare const LogoutFailure: AuthStory;
export declare const TokenRefreshSuccess: AuthStory;
export declare const TokenRefreshFailure: AuthStory;
export declare const TokenRefreshTimeout: AuthStory;
export declare const LocalStorageIntegration: AuthStory;
export declare const NetworkErrorHandling: AuthStory;
declare const _default: {
title?: string | undefined;
id?: string | undefined;
includeStories?: (RegExp | string[]) | undefined;
excludeStories?: (RegExp | string[]) | undefined;
component?: React.ComponentType<any> | undefined;
subcomponents?: Record<string, React.ComponentType<any>> | undefined;
play?: import("@storybook/core/csf").PlayFunction<import("@storybook/react/dist/types-5617c98e").R, import("../components/Auth").AuthProps> | undefined;
globals?: import("@storybook/core/csf").Globals | undefined;
decorators?: import("@storybook/core/csf").DecoratorFunction<import("@storybook/react/dist/types-5617c98e").R, {
children: React.ReactNode;
refreshFunction: () => Promise<void>;
refreshInterval: number;
onAuthStateChange?: ((isAuthenticated: boolean) => void) | undefined;
invalidateAuthTags?: (() => void) | undefined;
}> | import("@storybook/core/csf").DecoratorFunction<import("@storybook/react/dist/types-5617c98e").R, {
children: React.ReactNode;
refreshFunction: () => Promise<void>;
refreshInterval: number;
onAuthStateChange?: ((isAuthenticated: boolean) => void) | undefined;
invalidateAuthTags?: (() => void) | undefined;
}>[] | undefined;
parameters?: import("@storybook/core/csf").Parameters | undefined;
args?: Partial<import("../components/Auth").AuthProps> | undefined;
argTypes?: Partial<import("@storybook/core/csf").ArgTypes<import("../components/Auth").AuthProps>> | undefined;
loaders?: import("@storybook/core/csf").LoaderFunction<import("@storybook/react/dist/types-5617c98e").R, import("../components/Auth").AuthProps> | import("@storybook/core/csf").LoaderFunction<import("@storybook/react/dist/types-5617c98e").R, import("../components/Auth").AuthProps>[] | undefined;
beforeEach?: import("@storybook/core/csf").BeforeEach<import("@storybook/react/dist/types-5617c98e").R, import("../components/Auth").AuthProps> | import("@storybook/core/csf").BeforeEach<import("@storybook/react/dist/types-5617c98e").R, import("../components/Auth").AuthProps>[] | undefined;
experimental_afterEach?: import("@storybook/core/csf").AfterEach<import("@storybook/react/dist/types-5617c98e").R, import("../components/Auth").AuthProps> | import("@storybook/core/csf").AfterEach<import("@storybook/react/dist/types-5617c98e").R, import("../components/Auth").AuthProps>[] | undefined;
render?: import("@storybook/core/csf").ArgsStoryFn<import("@storybook/react/dist/types-5617c98e").R, import("../components/Auth").AuthProps> | undefined;
tags?: string[] | undefined;
mount?: ((context: import("@storybook/core/csf").StoryContext<import("@storybook/react/dist/types-5617c98e").R, import("../components/Auth").AuthProps>) => (ui?: React.JSX.Element | undefined) => Promise<import("@storybook/core/csf").Canvas>) | undefined;
};
export default _default;