orbital-base-components 0.1.1

Headless base primitives for Orbital — structure, semantics, and accessibility
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::OrbitalDateTime;

/// Shortcut preset shown on calendar/picker shortcut bars.
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct PickerShortcut {
    pub label: String,
    pub value: OrbitalDateTime,
}

impl PickerShortcut {
    pub fn new(label: impl Into<String>, value: OrbitalDateTime) -> Self {
        Self {
            label: label.into(),
            value,
        }
    }
}