forked from marimo-team/marimo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdetails.py
96 lines (71 loc) · 1.33 KB
/
details.py
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import marimo
__generated_with = "0.10.19"
app = marimo.App()
@app.cell(hide_code=True)
def _(mo):
mo.md(r"""Create expandable markdown blocks with `details`:""")
return
@app.cell
def _(mo):
mo.md(
"""
/// details | Hello, details!
Some additional content.
///
"""
)
return
@app.cell(hide_code=True)
def _(mo):
mo.md(r"""Style details using the "type" argument:""")
return
@app.cell
def _(mo):
mo.md(
"""
/// details | Info details
type: info
Some additional content.
///
"""
)
return
@app.cell
def _(mo):
mo.md(
"""
/// details | Warning details
type: warn
This highlights something to watch out for
///
"""
)
return
@app.cell
def _(mo):
mo.md(
"""
/// details | Danger details
type: danger
This indicates a critical warning or dangerous situation
///
"""
)
return
@app.cell
def _(mo):
mo.md(
"""
/// details | Success details
type: success
This indicates a successful outcome or positive note
///
"""
)
return
@app.cell
def _():
import marimo as mo
return (mo,)
if __name__ == "__main__":
app.run()