forked from radovankavicky/dash-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomponents.py
More file actions
29 lines (24 loc) · 689 Bytes
/
Copy pathcomponents.py
File metadata and controls
29 lines (24 loc) · 689 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
import dash_core_components as dcc
import dash_html_components as html
from tutorial import styles
def Syntax(children,
language='python',
style=styles.code_container,
summary=''):
if summary:
return html.Details([
html.Summary(summary),
dcc.SyntaxHighlighter(
children,
language=language,
customStyle=style
)
], open=True)
else:
return dcc.SyntaxHighlighter(
children,
language=language,
customStyle=style
)
def Example(example):
return html.Div(example, className='example-container')