Skip to main content

Crate dx_story

Crate dx_story 

Source
Expand description

Dioxus component stories.

use dioxus::prelude::*;
use dx_story::{stories, story};

#[story]
fn default() -> Element {
    rsx! { button { "Save" } }
}

#[stories(id = "button", name = "Button")]
const BUTTON_STORIES: () = &[default];

Modules§

catalog
Catalog UI.

Structs§

Story
A renderable component state.
StorySet
A component and its stories.

Enums§

RegistryError
A registry validation failure.

Functions§

find
Finds a story by story set and story ID.
init_registry
Validates registered story sets.
launch
Validates the registry, then launches root.
story_sets
Registered story sets in display-name order.

Attribute Macros§

stories
Registers a story set from a const array of story functions.
story
Registers a zero-argument Dioxus render function.