Skip to main content

euv_ui/component/collapsible/view/
struct.rs

1use super::*;
2
3/// Props for the [`euv_collapsible`] component.
4///
5/// The collapsible carries the state of the section and the trigger and
6/// the content inside it read that same state.
7#[derive(Clone, CustomDebug, Default)]
8pub struct EuvCollapsibleProps {
9    /// Whether the section is open.
10    pub open: Signal<bool>,
11}
12
13/// Props for the [`euv_collapsible_trigger`] component.
14///
15/// The trigger carries the state of the section so it can report the
16/// state to a reader and toggle the section when it is pressed.
17#[derive(Clone, CustomDebug, Default)]
18pub struct EuvCollapsibleTriggerProps {
19    /// Whether the section is open.
20    pub open: Signal<bool>,
21}
22
23/// Props for the [`euv_collapsible_content`] component.
24///
25/// The content carries the state of the section so it can hide itself
26/// when the section is closed.
27#[derive(Clone, CustomDebug, Default)]
28pub struct EuvCollapsibleContentProps {
29    /// Whether the section is open.
30    pub open: Signal<bool>,
31}