File size: 596 Bytes
0449aa7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b20b499
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import solara
from pathlib import Path


HERE = Path(__file__).parent


@solara.component
def Page():
    md_text = (HERE.parent / "README.md").read_text()
    # take out front matter
    md_text = md_text.rpartition("---")[2]
    solara.Markdown(md_text)
    solara.Title("Draw data widget demo with Solara ☀️")



@solara.component
def Layout(children):
    dark_effective = solara.lab.use_dark_effective()
    # I like a dark toolbar always, just a different color in dark mode
    return solara.AppLayout(children=children, toolbar_dark=True, color=None if dark_effective else "primary")