story: Fix modal story button style. (#306)

<img width="606" alt="image"
src="https://github.com/user-attachments/assets/685299d3-5a29-4444-9b0d-14947ecf8a26">

Fix #305
This commit is contained in:
Jason Lee 2024-10-04 09:40:56 +08:00 committed by GitHub
parent 9a64bc43d9
commit 45b7450b5c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -458,7 +458,8 @@ impl Render for ModalStory {
.child(self.input2.clone())
.child(
Button::new("test-action")
.label("Test Dispatch Action")
.label("Test Action")
.flex_shrink_0()
.on_click(|_, cx| {
cx.dispatch_action(Box::new(TestAction));
}).tooltip("This button for test dispatch action, to make sure when Modal close,\nthis still can handle the action."),
@ -468,6 +469,7 @@ impl Render for ModalStory {
h_flex()
.items_start()
.gap_3()
.flex_wrap()
.child(
Button::new("show-drawer-left")
.label("Left Drawer...")
@ -514,6 +516,7 @@ impl Render for ModalStory {
.child(
h_flex()
.gap_3()
.flex_wrap()
.child(
Button::new("show-notify-info")
.label("Info Notify...")