Deprecated Storybook addon that throws migration errors directing users to the new package structure in Storybook 9.0
86
Create Storybook stories with reusable visual context wrappers.
You need to create stories for a Button component and a Card component. These stories should display components with consistent visual styling context applied through wrappers.
Your task is to:
This tests your ability to use wrapper functions that apply consistent context across stories without duplicating code.
Button.stories.js with a default export containing the component metadataPrimary and Secondarydiv with 20px paddingCard.stories.js with a default export containing the component metadataDefault and FeaturedFeatured story that wraps content in a div with a dark background class@generates @generates
You can assume these components exist and are already imported:
// Button component
const Button = ({ variant, label }) => (
<button className={`btn-${variant}`}>{label}</button>
);
// Card component
const Card = ({ title, content }) => (
<div className="card">
<h3>{title}</h3>
<p>{content}</p>
</div>
);Your story files should:
Provides React component story support and configuration.
Provides UI component rendering support.
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