generate-component-story

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Instructions

说明

When creating component stories:
  1. Follow existing patterns: Base stories on the styles found in
    crates/story/src/stories
    (examples:
    tabs_story.rs
    ,
    group_box_story.rs
    , etc.)
  2. Use sections: Organize the story with
    section!
    calls for each major part
  3. Comprehensive coverage: Include all options, variants, and usage examples of the component
创建组件Story时:
  1. 遵循现有模式:基于
    crates/story/src/stories
    中的样式编写Story(示例:
    tabs_story.rs
    group_box_story.rs
    等)
  2. 使用章节:通过
    section!
    调用组织Story的每个主要部分
  3. 全面覆盖:包含组件的所有选项、变体和用法示例

Examples

示例

A typical story structure includes:
  • Basic usage examples
  • Different variants and states
  • Interactive examples
  • Edge cases and error states
典型的Story结构包括:
  • 基础用法示例
  • 不同变体和状态
  • 交互式示例
  • 边缘情况和错误状态