@storybook/addon-themes
Advanced tools
Comparing version
@@ -5,2 +5,20 @@ import * as core_dist_types from 'storybook/internal/types'; | ||
interface ThemesParameters$1 { | ||
/** | ||
* Themes configuration | ||
* | ||
* @see https://github.com/storybookjs/storybook/blob/next/code/addons/themes/README.md | ||
*/ | ||
themes: { | ||
/** Remove the addon panel and disable the addon's behavior */ | ||
disable?: boolean; | ||
/** Which theme to override for the story */ | ||
themeOverride?: string; | ||
}; | ||
} | ||
interface ThemesGlobals { | ||
/** Which theme to override for the story */ | ||
theme?: string; | ||
} | ||
interface ClassNameStrategyConfiguration { | ||
@@ -31,7 +49,3 @@ themes: Record<string, string>; | ||
interface ThemeParameters { | ||
themeOverride?: string; | ||
disable?: boolean; | ||
} | ||
type ThemesParameters = ThemesParameters$1['themes']; | ||
/** | ||
@@ -42,3 +56,3 @@ * @param StoryContext | ||
declare function pluckThemeFromContext({ globals }: StoryContext): string; | ||
declare function useThemeParameters(context?: StoryContext): ThemeParameters; | ||
declare function useThemeParameters(context?: StoryContext): ThemesParameters; | ||
declare function initializeThemeState(themeNames: string[], defaultTheme: string): void; | ||
@@ -59,2 +73,2 @@ | ||
export { ClassNameStrategyConfiguration, DataAttributeStrategyConfiguration, helpers as DecoratorHelpers, ProviderStrategyConfiguration, _default as default, withThemeByClassName, withThemeByDataAttribute, withThemeFromJSXProvider }; | ||
export { ClassNameStrategyConfiguration, DataAttributeStrategyConfiguration, helpers as DecoratorHelpers, ProviderStrategyConfiguration, ThemesGlobals, ThemesParameters$1 as ThemesParameters, _default as default, withThemeByClassName, withThemeByDataAttribute, withThemeFromJSXProvider }; |
{ | ||
"name": "@storybook/addon-themes", | ||
"version": "0.0.0-pr-30197-sha-a3d613d5", | ||
"version": "0.0.0-pr-30197-sha-de13df08", | ||
"description": "Switch between multiple themes for you components in Storybook", | ||
@@ -73,6 +73,6 @@ "keywords": [ | ||
"@storybook/icons": "^1.2.12", | ||
"typescript": "^5.3.2" | ||
"typescript": "^5.7.3" | ||
}, | ||
"peerDependencies": { | ||
"storybook": "^0.0.0-pr-30197-sha-a3d613d5" | ||
"storybook": "^0.0.0-pr-30197-sha-de13df08" | ||
}, | ||
@@ -79,0 +79,0 @@ "publishConfig": { |
20265
2.56%159
10.42%