From b220671ffb1b03950d1f07b4bee864a742feca70 Mon Sep 17 00:00:00 2001 From: Jared Parnell Date: Tue, 9 Aug 2022 16:30:21 +0100 Subject: [PATCH] dashboard-filters: Add a cleaer button and fix column widths This sets the column widths so that the final column can contain a clear button. This means that the CSS must be updated for each filter added, but provides a clear and consistent layout including a clear button --- .../sort-filter-bar/sort-filter-bar.config.yml | 10 +--------- .../04-modules/sort-filter-bar/sort-filter-bar.njk | 1 + .../04-modules/sort-filter-bar/sort-filter-bar.scss | 8 +++++++- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/components/04-modules/sort-filter-bar/sort-filter-bar.config.yml b/src/components/04-modules/sort-filter-bar/sort-filter-bar.config.yml index 37bbdd5..b8017e7 100644 --- a/src/components/04-modules/sort-filter-bar/sort-filter-bar.config.yml +++ b/src/components/04-modules/sort-filter-bar/sort-filter-bar.config.yml @@ -5,13 +5,5 @@ context: - label: Alphabetically active: true status: Sorting alphabetically - - label: Filter by recipient - active: false - - label: Filter by data feature - active: true - selected_item: Include charity or company nos. - status: 'Filtering by: Include charity or company nos.' - - label: Filter by data file - active: false - - label: Filter by data file + - label: Filter by publisher active: false diff --git a/src/components/04-modules/sort-filter-bar/sort-filter-bar.njk b/src/components/04-modules/sort-filter-bar/sort-filter-bar.njk index 64fd7a4..16a8f04 100644 --- a/src/components/04-modules/sort-filter-bar/sort-filter-bar.njk +++ b/src/components/04-modules/sort-filter-bar/sort-filter-bar.njk @@ -16,4 +16,5 @@ {% endfor %} + diff --git a/src/components/04-modules/sort-filter-bar/sort-filter-bar.scss b/src/components/04-modules/sort-filter-bar/sort-filter-bar.scss index 977f63b..fc63791 100644 --- a/src/components/04-modules/sort-filter-bar/sort-filter-bar.scss +++ b/src/components/04-modules/sort-filter-bar/sort-filter-bar.scss @@ -3,7 +3,7 @@ $border-arrow-colour: hsla(var(--gray-30-hsl), 1); display: grid; - grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); + grid-template-columns: 1fr 1fr 100px; grid-gap: 10px; &__select-wrapper { @@ -51,3 +51,9 @@ } } } + +.clear-all { + border: none; + height: 35px; + width: 100px; +}