use crate::widgets::markdown_widget::extensions::scrollbar::{CustomScrollbar, ScrollbarConfig};
use crate::widgets::markdown_widget::state::scroll_state::ScrollState;
impl<'a> CustomScrollbar<'a> {
pub fn new(scroll_state: &'a ScrollState) -> Self {
Self {
scroll_state,
config: ScrollbarConfig::default(),
show_percentage: false,
}
}
pub fn config(mut self, config: ScrollbarConfig) -> Self {
self.config = config;
self
}
pub fn show_percentage(mut self, show: bool) -> Self {
self.show_percentage = show;
self
}
}