Skip to content

Commit e65a940

Browse files
authored
Merge pull request #116 from statisticsnorway/alert_update
Alert update
2 parents 114e923 + 7418818 commit e65a940

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "ssb-konjunk"
3-
version = "2.0.5"
3+
version = "2.0.6"
44
description = "SSB Konjunk 422"
55
authors = [
66
{name = "Johanne Saxegaard", email = "jox@ssb.no"},
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import uuid
2+
from typing import Optional
3+
import dash_bootstrap_components as dbc
4+
5+
6+
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

Comments
 (0)