storybook-theme-switch-addon
Version:
Switch easily between multiple themes declared in your css files
23 lines (20 loc) • 597 B
TypeScript
import { ProjectAnnotations, Renderer } from '@storybook/types';
type ArrayElement<ArrType> = ArrType extends readonly (infer ElementType)[] ? ElementType : never;
declare const globalTypes: {
stylesheets: {
themes: {
id: string;
title: string;
url: string;
}[];
};
};
declare const themes: {
id: string;
title: string;
url: string;
}[];
type GlobalTypes = typeof globalTypes;
type Theme = ArrayElement<typeof themes>;
declare const preview: ProjectAnnotations<Renderer>;
export { GlobalTypes, Theme, preview as default };