Deprecated Storybook addon that throws migration errors directing users to the new package structure in Storybook 9.0
86
Create Storybook stories for a UserProfile component that load data asynchronously before rendering.
@generates
The story file should export:
import type { Meta, StoryObj } from '@storybook/react';
// Type definitions for the data structures
interface User {
id: number;
name: string;
email: string;
role: string;
}
interface Config {
apiBaseUrl: string;
theme: string;
}
// Default export: Meta configuration for the UserProfile component
// - Component: UserProfile (imported from './UserProfile')
// - Title: 'Components/UserProfile'
// - Must include async data fetching mechanism that provides Config data available to all stories
// Named export: Admin story
// - Must fetch User data asynchronously before rendering
// - Must render UserProfile component with user data and theme from loaded config
// Named export: RegularUser story
// - Must fetch User data asynchronously before rendering with error handling
// - On fetch failure, must provide fallback guest user data
// - Must render UserProfile component with user data and theme from loaded configProvides React-specific Storybook types and rendering support, including Meta, StoryObj, and the loader context system.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/npm-storybook--addon-backgroundsdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10