1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! Demo box for layout and shell previews.
use *;
use component_doc;
/// Dashed-border layout preview surface for shell demos and unimplemented primitive stubs.
///
/// Use inside layout component previews to show where main content would render. Gap primitive stubs pass `label=placeholder_label("ComponentName")` for consistent todo labels.
///
/// # When to use
///
/// - Component preview pages for layout components - Storybook-style demos where real page content is out of scope - Placeholder stubs for primitives not yet implemented
///
/// # Examples
///
/// ## Default
/// Dashed-border box filling a fixed-height region where main content would render. Use in shell and layout previews when real page content is out of scope.
/// <!-- default -->
/// <!-- preview -->
/// ```rust
/// view! {
/// <div data-testid="demo-box-preview" style="height: 260px;">
/// <DemoBox fill=true />
/// </div>
/// }
/// ```
///
/// ## With Label
/// Same dashed surface with a custom label identifying the content region. Use when multiple demo areas need distinct labels in a layout preview.
/// <!-- preview -->
/// ```rust
/// view! {
/// <div data-testid="demo-box-labeled" style="height: 260px;">
/// <DemoBox fill=true label="Main content area" />
/// </div>
/// }
/// ```