Webpack 4-based builder for Storybook that provides framework-agnostic build engine for preview iframe compilation and bundling.
91
Create an interactive product card component with dynamic controls for customization.
Build a product card component that displays product information with configurable styling and behavior. The component should support various customization options that users can interact with through Storybook's control panel.
The component should accept the following properties:
Create stories that demonstrate:
The controls should be configured with:
@generates
interface ProductCardProps {
title: string;
price: number;
description: string;
inStock: boolean;
category: 'Electronics' | 'Clothing' | 'Books' | 'Home & Garden';
tags: Array<'New' | 'Sale' | 'Featured' | 'Limited Edition' | 'Best Seller'>;
rating: number;
imageUrl: string;
discount: number;
}
export function ProductCard(props: ProductCardProps): JSX.Element;@generates
The stories file should:
Provides Storybook support for React components including story format and controls.
@satisfied-by
React library for building the component.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/npm-storybook--builder-webpack4evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10