We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 114e923 + 7418818 commit e65a940Copy full SHA for e65a940
pyproject.toml
@@ -1,6 +1,6 @@
1
[project]
2
name = "ssb-konjunk"
3
-version = "2.0.5"
+version = "2.0.6"
4
description = "SSB Konjunk 422"
5
authors = [
6
{name = "Johanne Saxegaard", email = "jox@ssb.no"},
src/ssb_konjunk/components/alert.py
@@ -0,0 +1,17 @@
+import uuid
+from typing import Optional
+import dash_bootstrap_components as dbc
+
+def create_alert(title: str, id: Optional[str] = None):
7
+ if id is None:
8
+ id = str(uuid.uuid4())
9
+ return dbc.Alert(
10
+ title,
11
+ id=id,
12
+ is_open=True,
13
+ className="visualizer-alert",
14
+ duration=4000,
15
+ fade=True,
16
+ )
17
0 commit comments