ratatui_toolkit/primitives/button/methods/
set_area.rs

1use ratatui::layout::Rect;
2
3use crate::primitives::button::Button;
4
5impl Button {
6    /// Sets the button's area (used for click detection).
7    ///
8    /// # Arguments
9    ///
10    /// * `area` - The rectangular area where the button is rendered
11    #[inline]
12    pub fn set_area(&mut self, area: Rect) {
13        self.area = Some(area);
14    }
15}