From d7f1583c3c7a207916419bfe8a45e90f1f30f1ea Mon Sep 17 00:00:00 2001 From: tcbegley Date: Sun, 30 Dec 2018 14:28:45 +0000 Subject: [PATCH] Add brand link to logo example --- .../advanced-component-usage/CustomNavbar.py | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/examples/advanced-component-usage/CustomNavbar.py b/examples/advanced-component-usage/CustomNavbar.py index 2bdcc7eac..2634eb594 100644 --- a/examples/advanced-component-usage/CustomNavbar.py +++ b/examples/advanced-component-usage/CustomNavbar.py @@ -5,6 +5,7 @@ """ import dash import dash_bootstrap_components as dbc +import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output, State @@ -64,14 +65,19 @@ logo = dbc.CustomNavbar( dbc.Container( [ - # Use row and col to control vertical alignment of logo and brand - dbc.Row( - [ - dbc.Col(html.Img(src=PLOTLY_LOGO, height="30px")), - dbc.Col(html.Span("Logo", className="ml-2 navbar-brand")), - ], - align="center", - no_gutters=True, + html.A( + # Use row and col to control vertical alignment of logo / brand + dbc.Row( + [ + dbc.Col(html.Img(src=PLOTLY_LOGO, height="30px")), + dbc.Col( + html.Span("Logo", className="ml-2 navbar-brand") + ), + ], + align="center", + no_gutters=True, + ), + href="https://plot.ly", ), dbc.NavbarToggler(id="navbar-toggler2"), dbc.Collapse(