MordhauBuddy


State

Namespace: MordhauBuddy.App.Snackbar

Functions and values

Function or valueDescription
add(snack)
Signature: snack:Snack<'a> -> Cmd<Msg<'a>>
Type parameters: 'a

Adds the specified snack to the snackbar model. Returns the updated model and commands that must be executed.

create(message)
Signature: message:string -> Snack<'a>
Type parameters: 'a

Creates a snack with the specified message.

init()
Signature: unit -> Model<'a>
Type parameters: 'a
update msg m
Signature: msg:Msg<'a> -> m:Model<'a> -> Model<'a> * Cmd<Msg<'b>> * Cmd<'a>
Type parameters: 'a, 'b
withCustomAction(...)
Signature: actionTxt:string -> actionMsg:'?9545 -> snack:Snack<'?9545> -> Snack<'?9545>
Type parameters: '?9545

Adds an action to the snack that hides the snack and causes the specified message to be dispatched in the command returned by the update function.

withDismissAction dismissTxt snack
Signature: dismissTxt:string -> snack:Snack<'a> -> Snack<'a>
Type parameters: 'a

Adds an action to the snack that hides the snack.

withTimeout timeoutMs snack
Signature: timeoutMs:int -> snack:Snack<'a> -> Snack<'a>
Type parameters: 'a

Sets the specified timeout for the snack.