storybook: Fix kitchen sink story (#3064)
This PR fixes the kitchen sink story in the storybook. Included are some additional changes that make it so the kitchen sink is automatically populated by all of the defined stories. Release Notes: - N/A
This commit is contained in:
parent
f26ca0866c
commit
247c7eff14
3 changed files with 28 additions and 81 deletions
|
@ -70,33 +70,11 @@ fn main() {
|
|||
..Default::default()
|
||||
},
|
||||
|cx| match args.story {
|
||||
// HACK: Special-case the kitchen sink to fix scrolling.
|
||||
// There is something about going through `children_any` that messes
|
||||
// with the scroll interactions.
|
||||
Some(StorySelector::KitchenSink) => view(move |cx| {
|
||||
render_story(
|
||||
&mut ViewContext::new(cx),
|
||||
theme_override.clone(),
|
||||
crate::stories::kitchen_sink::KitchenSinkStory::default(),
|
||||
)
|
||||
}),
|
||||
// HACK: Special-case the panel story to fix scrolling.
|
||||
// There is something about going through `children_any` that messes
|
||||
// with the scroll interactions.
|
||||
Some(StorySelector::Component(story_selector::ComponentStory::Panel)) => {
|
||||
view(move |cx| {
|
||||
render_story(
|
||||
&mut ViewContext::new(cx),
|
||||
theme_override.clone(),
|
||||
crate::stories::components::panel::PanelStory::default(),
|
||||
)
|
||||
})
|
||||
}
|
||||
Some(selector) => view(move |cx| {
|
||||
render_story(
|
||||
&mut ViewContext::new(cx),
|
||||
theme_override.clone(),
|
||||
div().children_any(selector.story()),
|
||||
div().flex().flex_col().h_full().child_any(selector.story()),
|
||||
)
|
||||
}),
|
||||
None => view(move |cx| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue