diff --git a/crates/ui/src/button.rs b/crates/ui/src/button.rs index 352e79e5..53354930 100644 --- a/crates/ui/src/button.rs +++ b/crates/ui/src/button.rs @@ -106,6 +106,16 @@ pub trait ButtonVariants: Sized { } } +/// Which side of the label the icon sits on. +#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] +pub enum IconPosition { + /// Left of the label. + #[default] + Start, + /// Right of the label. + End, +} + /// A Button element. #[derive(IntoElement)] #[allow(clippy::type_complexity)] @@ -125,6 +135,7 @@ pub struct Button { on_click: Option>, tab_stop: bool, selected: bool, + icon_position: IconPosition, } impl From