ratatui_toolkit/primitives/button/constructors/
normal_style.rs

1use ratatui::style::Style;
2
3use crate::primitives::button::Button;
4
5impl Button {
6    /// Sets the normal (non-hovered) style for the button.
7    ///
8    /// # Arguments
9    ///
10    /// * `style` - The style to apply when the button is not hovered
11    ///
12    /// # Returns
13    ///
14    /// `self` for method chaining
15    ///
16    /// # Example
17    ///
18    /// ```rust
19    /// use ratatui::style::{Color, Style};
20    /// use ratatui_toolkit::Button;
21    ///
22    /// let button = Button::new("Click Me")
23    ///     .normal_style(Style::default().fg(Color::White));
24    /// ```
25    pub fn normal_style(mut self, style: Style) -> Self {
26        self.normal_style = style;
27        self
28    }
29}