-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathusage_modal.py
More file actions
43 lines (39 loc) · 898 Bytes
/
usage_modal.py
File metadata and controls
43 lines (39 loc) · 898 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import dash_mp_components as mpc
import dash
from dash import dcc, html
app = dash.Dash(__name__)
app.layout = html.Div([
mpc.ModalContextProvider(
[
mpc.ModalTrigger(
html.Button("Open Modal")
),
mpc.Modal(
html.Div("Modal content")
)
]
),
mpc.DrawerContextProvider(
[
mpc.DrawerTrigger(
html.Button("Open Drawer 1"),
forDrawerId="drawer-1"
),
mpc.DrawerTrigger(
html.Button("Open Drawer 2"),
forDrawerId="drawer-2"
),
mpc.Drawer(
html.Div("Drawer content"),
id="drawer-1"
),
mpc.Drawer(
html.Div("Other drawer content"),
id="drawer-2"
)
]
)
])
# use True to load a dev build of react
if __name__ == '__main__':
app.run_server(debug=True, port=8051)