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

1//! Constructor for pane configuration.
2
3use crate::primitives::pane::Pane;
4use crate::widgets::markdown_widget::widget::MarkdownWidget;
5
6impl<'a> MarkdownWidget<'a> {
7    /// Configure the Pane that wraps the widget.
8    ///
9    /// When `has_pane` is true (default), the widget is wrapped in this Pane.
10    /// Use this to customize the pane's title, icon, padding, border style, etc.
11    ///
12    /// # Arguments
13    ///
14    /// * `pane` - The Pane configuration to use
15    ///
16    /// # Returns
17    ///
18    /// The modified `MarkdownWidget` instance.
19    pub fn with_pane(mut self, pane: Pane<'a>) -> Self {
20        self.pane = Some(pane);
21        self
22    }
23}