Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
huacnlee committed Jan 9, 2025
1 parent c4da5be commit 0018a80
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/story/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,8 @@ impl Panel for StoryContainer {
.menu("Info", Box::new(ShowPanelInfo))
}

fn toolbar_buttons(&self, _cx: &WindowContext) -> Vec<Button> {
vec![
fn toolbar_buttons(&self, _cx: &mut ViewContext<Self>) -> Option<Vec<Button>> {
Some(vec![
Button::new("info").icon(IconName::Info).on_click(|_, cx| {
cx.push_notification("You have clicked info button");
}),
Expand All @@ -358,7 +358,7 @@ impl Panel for StoryContainer {
.on_click(|_, cx| {
cx.push_notification("You have clicked search button");
}),
]
])
}

fn dump(&self, _cx: &AppContext) -> PanelState {
Expand Down

0 comments on commit 0018a80

Please sign in to comment.