rat_widget/calendar/
style.rs

1use crate::_private::NonExhaustive;
2use ratatui::style::Style;
3use ratatui::widgets::Block;
4
5/// Composite style for the calendar.
6#[derive(Debug, Clone)]
7pub struct CalendarStyle {
8    /// Base style.
9    pub style: Style,
10    /// Title style.
11    pub title: Option<Style>,
12    /// Week-number style.
13    pub weeknum: Option<Style>,
14    /// Weekday style.
15    pub weekday: Option<Style>,
16    /// Default day style.
17    pub day: Option<Style>,
18    /// Selection style.
19    pub select: Option<Style>,
20    /// Focused style.
21    pub focus: Option<Style>,
22    /// Block.
23    pub block: Option<Block<'static>>,
24
25    pub non_exhaustive: NonExhaustive,
26}
27
28impl Default for CalendarStyle {
29    fn default() -> Self {
30        Self {
31            style: Default::default(),
32            title: None,
33            weeknum: None,
34            weekday: None,
35            day: None,
36            select: None,
37            focus: None,
38            block: None,
39            non_exhaustive: NonExhaustive,
40        }
41    }
42}