Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: logger component #1990

Merged
merged 3 commits into from
May 15, 2024
Merged

feature: logger component #1990

merged 3 commits into from
May 15, 2024

Conversation

jokd
Copy link
Contributor

@jokd jokd commented Apr 4, 2024

Fixes #1982
I think it's not complete but useful as it is and something to build upon, eg a console window would be nice.
As of now, this component makes it possible to render short messages for the user, either as a toast or modal with some input parameters.

Input parameters:
title
message
status (some bootstrap classes and colors; success, info, warning, danger, light(default))
duration (miliseconds, modal defaults to 0 and toast to 5000)
icon (only for toast)

origo.api().getLogger().createToast({status: 'warning', duration:2000, icon: '#ic_home_24px', title: 'Rubrik på meddelandet', message:'Innehållet måste vara intressant, annars är det onödigt. <br> HTML funkar'})

image
Toast

origo.api().getLogger().createModal({status: 'success', duration:10000, title: 'Rubrik på meddelandet', message:'Innehållet måste vara intressant, annars är det onödigt. <br> HTML funkar'})
image
Modal

@tonnyandersson
Copy link
Collaborator

LGTM.

@Flodkvist Flodkvist merged commit f51c8ad into origo-map:master May 15, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a toaster for messages
3 participants