use iced::{widget::Button, Element}; pub fn active_button<'a, Content: Into>, Message>( content: Content, ) -> Button<'a, Message> { iced::widget::button(content) .style(|theme: &iced::Theme, _status| iced::widget::button::Style { background: Some(iced::Background::Color( theme.extended_palette().primary.base.text, )), text_color: theme.extended_palette().primary.base.color, ..Default::default() }) .width(iced::Length::Fill) } pub fn inactive_button<'a, Content: Into>, Message>( content: Content, on_press: Message, ) -> Button<'a, Message> { iced::widget::button(content) .on_press(on_press) .width(iced::Length::Fill) }