Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/story/src/accordion_story.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl super::Story for AccordionStory {
"The accordion uses collapse internally to make it collapsible."
}

fn new_view(window: &mut Window, cx: &mut App) -> Entity<impl Render + Focusable> {
fn new_view(window: &mut Window, cx: &mut App) -> Entity<impl Render> {
Self::view(window, cx)
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/story/src/alert_story.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl super::Story for AlertStory {
"Displays a callout for user attention."
}

fn new_view(window: &mut Window, cx: &mut App) -> Entity<impl Render + Focusable> {
fn new_view(window: &mut Window, cx: &mut App) -> Entity<impl Render> {
Self::view(window, cx)
}

Expand Down
2 changes: 1 addition & 1 deletion crates/story/src/avatar_story.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl super::Story for AvatarStory {
"Avatar is an image that represents a user or organization."
}

fn new_view(window: &mut Window, cx: &mut App) -> Entity<impl Render + Focusable> {
fn new_view(window: &mut Window, cx: &mut App) -> Entity<impl Render> {
Self::view(window, cx)
}

Expand Down
2 changes: 1 addition & 1 deletion crates/story/src/badge_story.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl super::Story for BadgeStory {
"A red dot that indicates the number of unread messages."
}

fn new_view(window: &mut Window, cx: &mut App) -> Entity<impl Render + Focusable> {
fn new_view(window: &mut Window, cx: &mut App) -> Entity<impl Render> {
Self::view(window, cx)
}

Expand Down
73 changes: 36 additions & 37 deletions crates/story/src/button_story.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ impl super::Story for ButtonStory {
false
}

fn new_view(window: &mut Window, cx: &mut App) -> Entity<impl Render + Focusable> {
fn new_view(window: &mut Window, cx: &mut App) -> Entity<impl Render> {
Self::view(window, cx)
}
}
Expand Down Expand Up @@ -599,8 +599,8 @@ impl Render for ButtonStory {
),
)
.child(
section(
h_flex().gap_2().child("Toggle Button Group").child(
section("Toggle Button Group")
.sub_title(
Checkbox::new("multiple-button")
.text_sm()
.label("Multiple")
Expand All @@ -609,41 +609,40 @@ impl Render for ButtonStory {
view.toggle_multiple = !view.toggle_multiple;
cx.notify();
})),
)
.child(
ButtonGroup::new("toggle-button-group")
.outline()
.compact()
.multiple(toggle_multiple)
.child(
Button::new("disabled-toggle-button")
.label("Disabled")
.selected(disabled),
)
.child(
Button::new("loading-toggle-button")
.label("Loading")
.selected(loading),
)
.child(
Button::new("selected-toggle-button")
.label("Selected")
.selected(selected),
)
.child(
Button::new("compact-toggle-button")
.label("Compact")
.selected(compact),
)
.on_click(cx.listener(|view, selected: &Vec<usize>, _, cx| {
view.disabled = selected.contains(&0);
view.loading = selected.contains(&1);
view.selected = selected.contains(&2);
view.compact = selected.contains(&3);
cx.notify();
})),
),
)
.child(
ButtonGroup::new("toggle-button-group")
.outline()
.compact()
.multiple(toggle_multiple)
.child(
Button::new("disabled-toggle-button")
.label("Disabled")
.selected(disabled),
)
.child(
Button::new("loading-toggle-button")
.label("Loading")
.selected(loading),
)
.child(
Button::new("selected-toggle-button")
.label("Selected")
.selected(selected),
)
.child(
Button::new("compact-toggle-button")
.label("Compact")
.selected(compact),
)
.on_click(cx.listener(|view, selected: &Vec<usize>, _, cx| {
view.disabled = selected.contains(&0);
view.loading = selected.contains(&1);
view.selected = selected.contains(&2);
view.compact = selected.contains(&3);
cx.notify();
})),
),
)
.child(
section("Dropdown Button")
Expand Down
2 changes: 1 addition & 1 deletion crates/story/src/calendar_story.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ impl super::Story for CalendarStory {
"A calendar to select a date or date range."
}

fn new_view(window: &mut Window, cx: &mut App) -> Entity<impl Render + Focusable> {
fn new_view(window: &mut Window, cx: &mut App) -> Entity<impl Render> {
Self::view(window, cx)
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/story/src/chart_story.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ impl super::Story for ChartStory {
"Beautiful Charts & Graphs."
}

fn new_view(window: &mut Window, cx: &mut App) -> Entity<impl Render + Focusable> {
fn new_view(window: &mut Window, cx: &mut App) -> Entity<impl Render> {
Self::view(window, cx)
}

Expand Down
Loading
Loading