ratatui_toolkit/widgets/markdown_widget/widget/constructors/
has_pane.rs

1//! Constructor for has_pane option.
2
3use crate::widgets::markdown_widget::widget::MarkdownWidget;
4
5impl<'a> MarkdownWidget<'a> {
6    /// Set whether to wrap the widget in a Pane.
7    ///
8    /// When `has_pane` is true (default), the widget is wrapped in a styled Pane
9    /// with title, border, and padding. Set to false for raw markdown rendering.
10    ///
11    /// # Arguments
12    ///
13    /// * `has_pane` - Whether to wrap in a Pane (default: true)
14    ///
15    /// # Returns
16    ///
17    /// The modified `MarkdownWidget` instance.
18    pub fn with_has_pane(mut self, has_pane: bool) -> Self {
19        self.has_pane = has_pane;
20        self
21    }
22}