m3e/bottom_sheet_trigger
bottom_sheet_trigger provides Lustre support for the M3E Bottom Sheet Trigger component
Types
BottomSheetTrigger is an element, nested within a clickable element, used to trigger a bottom sheet
Fields:
- detent: The zero‑based index of the detent the sheet should open to.
- for: the ID of the associated BottomSheet.
- label: the label of the trigger
- role: Marks this trigger as a secondary trigger for accessibility. Secondary triggers do not receive ARIA ownership
pub opaque type BottomSheetTrigger
Config holds the configuration for a BottomSheetTrigger
pub type Config {
Config(
detent: option.Option(Int),
for: String,
label: String,
role: TriggerRole,
)
}
Constructors
-
Config( detent: option.Option(Int), for: String, label: String, role: TriggerRole, )
TriggerRole specifies if a trigger is primary or secondary for accessibility
pub type TriggerRole {
Primary
Secondary
}
Constructors
-
Primary -
Secondary
Values
pub fn default_config() -> Config
default_config creates a new Config with default values
pub const default_trigger_role: TriggerRole
pub fn detent(
b: BottomSheetTrigger,
detent: option.Option(Int),
) -> BottomSheetTrigger
detent sets the detent field of a BottomSheetTrigger
pub fn for(
b: BottomSheetTrigger,
for: String,
) -> BottomSheetTrigger
for sets the for field of a BottomSheetTrigger
pub fn from_config(c: Config) -> BottomSheetTrigger
from_config creates a BottomSheetTrigger from a Config record
pub fn label(
b: BottomSheetTrigger,
label: String,
) -> BottomSheetTrigger
label sets the label field of a BottomSheetTrigger
pub fn render(b: BottomSheetTrigger) -> element.Element(msg)
render creates a Lustre Element from a BottomSheetTrigger
pub fn render_config(config: Config) -> element.Element(msg)
render_config creates a Lustre Element directly from a Config
pub fn role(
b: BottomSheetTrigger,
role: TriggerRole,
) -> BottomSheetTrigger
role sets the role field of a BottomSheetTrigger