Skip to content

Commit

Permalink
Merge pull request #137 from communitiesuk/NewContextBox
Browse files Browse the repository at this point in the history
New context box
  • Loading branch information
duncanbradley authored Nov 21, 2023
2 parents 78888de + 99059c6 commit be3987c
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
1 change: 1 addition & 0 deletions gov_uk_dashboards/components/plotly/captioned_figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
29 changes: 29 additions & 0 deletions gov_uk_dashboards/components/plotly/context_banner.py
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit be3987c

Please sign in to comment.