Close feedback modal when clicking cancel
This commit is contained in:
parent
e228422f14
commit
a75f1a4a95
1 changed files with 4 additions and 1 deletions
|
@ -112,6 +112,8 @@ impl Render for FeedbackModal {
|
|||
type Element = Div;
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
|
||||
let dismiss = cx.listener(|_, _, cx| cx.emit(DismissEvent));
|
||||
|
||||
v_stack()
|
||||
.elevation_3(cx)
|
||||
.min_w(rems(40.))
|
||||
|
@ -135,7 +137,8 @@ impl Render for FeedbackModal {
|
|||
.child(
|
||||
Button::new("cancel_feedback", "Cancel")
|
||||
.style(ButtonStyle::Subtle)
|
||||
.color(Color::Muted),
|
||||
.color(Color::Muted)
|
||||
.on_click(dismiss),
|
||||
)
|
||||
.child(
|
||||
Button::new("send_feedback", "Send Feedback")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue