From 06e9b1a25c99e364fa263ab6a8d0137bfdea7246 Mon Sep 17 00:00:00 2001 From: Floyd Wang Date: Mon, 20 Jan 2025 13:49:42 +0800 Subject: [PATCH] dropdown_button: Add `compact` style (#555) --- crates/ui/src/button/dropdown_button.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/ui/src/button/dropdown_button.rs b/crates/ui/src/button/dropdown_button.rs index 51b02512..ca82b112 100644 --- a/crates/ui/src/button/dropdown_button.rs +++ b/crates/ui/src/button/dropdown_button.rs @@ -57,6 +57,11 @@ impl DropdownButton { self.rounded = rounded.into(); self } + + pub fn compact(mut self) -> Self { + self.compact = Some(true); + self + } } impl Styled for DropdownButton {