|
3 | 3 | import dash_core_components as dcc |
4 | 4 | import dash_bootstrap_components as dbc |
5 | 5 |
|
| 6 | + |
6 | 7 | def Header(name, app): |
7 | 8 | title = html.H2(name, style={"margin-top": 7}) |
8 | 9 | logo = html.Img( |
9 | 10 | src=app.get_asset_url("dash-logo.png"), style={"float": "right", "height": 60} |
10 | 11 | ) |
11 | 12 | link = html.A(logo, href="https://plotly.com/dash/") |
12 | | - btn_style = {'margin-top': '13px', 'float': 'right', 'margin-right': '10px'} |
13 | | - demo_btn = html.A(dbc.Button("Enterprise Demo", style=btn_style, color="primary"), href="https://plotly.com/get-demo/") |
14 | | - code_btn = html.A(dbc.Button("Source Code", style=btn_style, color="secondary"), href="https://github.com/plotly/dash-sample-apps/tree/main/apps/dash-interest-rate") |
| 13 | + btn_style = {"margin-top": "13px", "float": "right", "margin-right": "10px"} |
| 14 | + demo_btn = html.A( |
| 15 | + dbc.Button("Enterprise Demo", style=btn_style, color="primary"), |
| 16 | + href="https://plotly.com/get-demo/", |
| 17 | + ) |
| 18 | + code_btn = html.A( |
| 19 | + dbc.Button("Source Code", style=btn_style, color="secondary"), |
| 20 | + href="https://github.com/plotly/dash-sample-apps/tree/main/apps/dash-interest-rate", |
| 21 | + ) |
15 | 22 |
|
16 | 23 | return dbc.Row([dbc.Col(title, md=7), dbc.Col([link, demo_btn, code_btn], md=5)]) |
17 | 24 |
|
| 25 | + |
18 | 26 | def OptionMenu(values, label, **kwargs): |
19 | 27 | options = [{"label": s.replace("_", " ").capitalize(), "value": s} for s in values] |
20 | 28 | kwargs["value"] = kwargs.get("value", values[0]) |
|
0 commit comments