diff --git a/gov_uk_dashboards/components/plotly/captioned_figure.py b/gov_uk_dashboards/components/plotly/captioned_figure.py index c6ead7e..bf8cd3f 100644 --- a/gov_uk_dashboards/components/plotly/captioned_figure.py +++ b/gov_uk_dashboards/components/plotly/captioned_figure.py @@ -16,6 +16,7 @@ def captioned_figure( desktop_only: bool = False, double_click_attribute: Union[str, bool] = True, ): + # pylint: disable=too-many-arguments """ Return figure with attached caption that can be read by a screen reader. diff --git a/gov_uk_dashboards/components/plotly/context_banner.py b/gov_uk_dashboards/components/plotly/context_banner.py new file mode 100644 index 0000000..52885a0 --- /dev/null +++ b/gov_uk_dashboards/components/plotly/context_banner.py @@ -0,0 +1,29 @@ +"""Context_banner""" +from dash import html + + +def context_banner(): + """ + Return context banner based on Gov UK Design component notification banner component. + """ + banner = html.Div( + [ + html.Div( + [ + html.P( + [ + "Data on its own does not present a complete picture. This explorer" + " should be used to generate questions and not reach judgements." + " See about the data section for more information.", + ], + className="govuk-warning-text__text notification-banner-under-filter-panel", + ) + ], + className="govuk-notification-banner__content", + ), + ], + className="govuk-notification-banner", + role="region", + style={"maxWidth": "1000px", "margin-top": "20px", "margin-bottom": "20px"}, + ) + return banner diff --git a/setup.py b/setup.py index f9d6441..0eb5a7a 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ author="Department for Levelling Up, Housing and Communities", description="Provides access to functionality common to creating a data dashboard.", name="gov_uk_dashboards", - version="9.18.0", + version="9.19.0", long_description=long_description, long_description_content_type="text/markdown", packages=find_packages(),