diff --git a/src/features/ui/ui/button.rs b/src/features/ui/ui/button.rs index bae76a7..40655a4 100644 --- a/src/features/ui/ui/button.rs +++ b/src/features/ui/ui/button.rs @@ -22,6 +22,28 @@ pub fn button( ) } +pub fn pill_button( + button_type: impl Component, + variant: ButtonVariant, + node: Node, + title: impl Into, + font_size: f32, +) -> impl Bundle { + ( + Button, + button_type, + variant.clone(), + node, + BackgroundColor(variant.normal_background()), + BorderRadius::MAX, + children![( + Text::new(title), + TextFont::from_font_size(font_size), + TextColor(variant.text_color()) + )], + ) +} + pub fn update_buttons( mut interaction_query: Query< (&Interaction, &ButtonVariant, &mut BackgroundColor),