Revise the MessageNotification
component (#24287)
This PR makes adding icons to the primary and secondary actions, in the `MessageNotification` component, optional. Also took the opportunity to remove a probably unnecessary "third action" from it; streamlining the component API (we had added that for a design that we're not using anymore). I did keep the "more info" possibility, which may be useful in the future, though. Release Notes: - N/A
This commit is contained in:
parent
17a7495332
commit
37db1dcd48
4 changed files with 106 additions and 94 deletions
|
@ -5207,8 +5207,9 @@ fn notify_if_database_failed(workspace: WindowHandle<Workspace>, cx: &mut AsyncA
|
|||
|cx| {
|
||||
cx.new(|_| {
|
||||
MessageNotification::new("Failed to load the database file.")
|
||||
.with_click_message("File an issue")
|
||||
.on_click(|_window, cx| cx.open_url(REPORT_ISSUE_URL))
|
||||
.primary_message("File an Issue")
|
||||
.primary_icon(IconName::Plus)
|
||||
.primary_on_click(|_window, cx| cx.open_url(REPORT_ISSUE_URL))
|
||||
})
|
||||
},
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue