diff --git a/vizro-core/examples/dev/app.py b/vizro-core/examples/dev/app.py index 3cc4a42a3..4d6390652 100644 --- a/vizro-core/examples/dev/app.py +++ b/vizro-core/examples/dev/app.py @@ -821,12 +821,12 @@ def multiple_cards(data_frame: pd.DataFrame, n_rows: Optional[int] = 1) -> html. if __name__ == "__main__": app = Vizro().build(dashboard) - new_link = dbc.NavLink( + banner = dbc.NavLink( ["Made with ", html.Img(src=get_asset_url("logo.svg"), id="banner", alt="Vizro logo"), "vizro"], href="https://github.com/mckinsey/vizro", target="_blank", className="anchor-container", ) - app.dash.layout.children = [app.dash.layout.children, new_link] + app.dash.layout.children = [app.dash.layout.children, banner] server = app.dash.server app.run() diff --git a/vizro-core/src/vizro/_vizro.py b/vizro-core/src/vizro/_vizro.py index 5f6e21bf0..2588a462d 100644 --- a/vizro-core/src/vizro/_vizro.py +++ b/vizro-core/src/vizro/_vizro.py @@ -50,10 +50,13 @@ def __init__(self, **kwargs): suppress_callback_exceptions=True, title="Vizro", use_pages=True, - # This is added here temporarily for testing. These stylesheets are required for certain dmc components. - # It may be better to include these stylesheets in the css folder. - external_stylesheets=dmc.styles.ALL, ) + + # Ensure external_stylesheets is a list and append the additional stylesheet + external_stylesheets = self.dash.config.external_stylesheets + self.dash.config.external_stylesheets = external_stylesheets if isinstance(external_stylesheets, list) else [ + external_stylesheets] + self.dash.config.external_stylesheets.append(dmc.styles.DATES) # When Vizro is used as a framework, we want to include the library and framework resources. # Dash serves resources in the order 1. external_stylesheets/scripts; 2. library resources from the diff --git a/vizro-core/src/vizro/models/_components/form/date_picker.py b/vizro-core/src/vizro/models/_components/form/date_picker.py index 65d2896da..222572342 100644 --- a/vizro-core/src/vizro/models/_components/form/date_picker.py +++ b/vizro-core/src/vizro/models/_components/form/date_picker.py @@ -26,7 +26,7 @@ class DatePicker(VizroBaseModel): [`dmc.DateRangePicker`](https://www.dash-mantine-components.com/components/datepicker#daterangepicker). Args: - type (Literal["default", "range", "multiple"]): Defaults to A single date picker allowing the selection of one date. + type (Literal["date_picker"]): Defaults to `"date_picker"`. min (Optional[date]): Start date for date picker. Defaults to `None`. max (Optional[date]): End date for date picker. Defaults to `None`. value (Union[list[date], date]): Default date/dates for date picker. Defaults to `None`. @@ -36,7 +36,7 @@ class DatePicker(VizroBaseModel): """ - type: Literal["default", "range", "multiple"] = "default" + type: Literal["date_picker"] = "date_picker" min: Optional[date] = Field(None, description="Start date for date picker.") max: Optional[date] = Field(None, description="End date for date picker.") value: Optional[Union[list[date], date]] = Field(None, description="Default date for date picker")