CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-storybook--addon-backgrounds

Deprecated Storybook addon that throws migration errors directing users to the new package structure in Storybook 9.0

86

1.08x
Overview
Eval results
Files

task.mdevals/scenario-1/

Custom Storybook Theme Configurator

A utility that creates and configures custom themes for Storybook UI with support for both light and dark color schemes.

Capabilities

Theme Creation

Create a custom theme configuration that can be applied to Storybook's UI.

  • Creating a theme with custom brand colors returns a valid theme object @test
  • Creating a theme without base theme specification defaults to light theme @test
  • Creating a dark theme includes dark color scheme properties @test

Brand Customization

Apply custom branding to the Storybook interface.

  • Setting a custom brand title updates the theme's brandTitle property @test
  • Setting a custom brand URL updates the theme's brandUrl property @test

Implementation

@generates

API

/**
 * Creates a custom Storybook theme with the specified configuration.
 *
 * @param {Object} config - The theme configuration object
 * @param {string} [config.base='light'] - The base theme to extend ('light' or 'dark')
 * @param {string} [config.brandTitle] - The title to display in the Storybook UI
 * @param {string} [config.brandUrl] - The URL to navigate to when clicking the brand
 * @param {string} [config.colorPrimary] - The primary brand color
 * @param {string} [config.colorSecondary] - The secondary brand color
 * @returns {Object} A theme object that can be used in Storybook configuration
 */
export function createCustomTheme(config) {
  // IMPLEMENTATION HERE
}

/**
 * Checks if a theme is using a dark color scheme.
 *
 * @param {Object} theme - The theme object to check
 * @returns {boolean} True if the theme uses a dark base, false otherwise
 */
export function isDarkTheme(theme) {
  // IMPLEMENTATION HERE
}

Dependencies { .dependencies }

@storybook/theming { .dependency }

Provides theme creation and styling utilities for Storybook UI.

@satisfied-by

Install with Tessl CLI

npx tessl i tessl/npm-storybook--addon-backgrounds

tile.json