StippleUI.jl
StippleUI.jl copied to clipboard
How to use StippleUI.Dialog as notification
Hi,
trying to add a notification (a dialog with OK button) to my Stipple app using Dialog (q-dialog) component. However could not managet to do. Need some help, please.
Put a Bool variable in your model and bind it to the dialog. A distilled example could look like this.
@reactive mutable struct Example <: ReactiveModel
show_dialog::R{Bool} = false
end
function ui(model)
dialog(fieldname = :show_dialog, card("Here is all the text"))
end
model.show_dialog[] = true
More information on the quasar dialog is found in the quasar docs. Maybe, we will change this component in the future to accept a symbol for the fieldname.
ok, in the next version it will be
julia> dialog(:show_dialog, card("Here is all the text"))
"<q-dialog v-model=\"show_dialog\"><q-card>Here is all the text</q-card></q-dialog>"
It's already in master, together with tooltip()
😉
@szafna does that meet your needs or do you need more information?
Can we close this?