button: Add flex_shrink_0 to the base (#383)

If you want the button to be flexible, add `flex_shrink`.
This commit is contained in:
Floyd Wang 2024-10-31 10:35:37 +08:00 committed by GitHub
parent d99c5246ee
commit 2dab196f68
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -175,7 +175,7 @@ impl From<Button> for AnyElement {
impl Button {
pub fn new(id: impl Into<ElementId>) -> Self {
Self {
base: div(),
base: div().flex_shrink_0(),
id: id.into(),
icon: None,
label: None,