text: #
  """
  This is a minimal example of changing themes with the ThemeChangerAIO component
  Note - this requires dash-bootstrap-components>=1.0.0 and dash>=2.0 dash-bootstrap-templates>=1.0.4
  """
  
  from dash import Dash, dcc, html, Input, Output
  import plotly.express as px
  import dash_bootstrap_components as dbc
  from dash_bootstrap_templates import ThemeChangerAIO, template_from_url
  
  df= px.data.gapminder()
  
  dbc_css = (
      "https://cdn.jsdelivr.net/gh/AnnMarieW/dash-bootstrap-templates@V1.0.2/dbc.min.css"
  )
  app = Dash(__name__, external_stylesheets=[dbc.themes.FLATLY, dbc_css])
  
  header = html.H4(
      "ThemeChangerAIO Demo", className="bg-primary text-white p-4 mb-2 text-center"
  )
  buttons = html.Div(
      [
          dbc.Button("Primary", color="primary"),
          dbc.Button("Secondary", color="secondary"),
          dbc.Button("Success", color="success"),
          dbc.Button("Warning", color="warning"),
          dbc.Button("Danger", color="danger"),
          dbc.Button("Info", color="info"),
          dbc.Button("Light", color="light"),
          dbc.Button("Dark", color="dark"),
          dbc.Button("Link", color="link"),
      ],
      className="m-4",
  )
  
  graph = html.Div(dcc.Graph(id="graph"), className="m-4")
  
  app.layout = dbc.Container(
      [
          header,
          dbc.Row(
              [
                  dbc.Col(
                      ThemeChangerAIO(
                          aio_id="theme", radio_props={"value": dbc.themes.FLATLY}
                      ),
                      width=2,
                  ),
                  dbc.Col([buttons, graph], width=10),
              ]
          ),
      ],
      className="m-4 dbc",
      fluid=True,
  )
  
  
  @app.callback(
      Output("graph", "figure"), Input(ThemeChangerAIO.ids.radio("theme"), "value"),
  )
  def update_graph_theme(theme):
      template=template_from_url(theme)
      return px.scatter(
          df.query("year==2007"),
          x="gdpPercap",
          y="lifeExp",
          size="pop",
          color="continent",
          log_x=True,
          size_max=60,
          template=template,
          title="Gapminder 2007: '%s' theme" % template,
      )
  
  if __name__ == "__main__":
      app.run_server(debug=True)
  