diff --git a/less/components/consonant/filters/top/panel.less b/less/components/consonant/filters/top/panel.less index f0ff1092..3c792495 100644 --- a/less/components/consonant/filters/top/panel.less +++ b/less/components/consonant/filters/top/panel.less @@ -13,7 +13,7 @@ &-inner { display: flex; flex-wrap: wrap; - justify-content: space-between; + justify-content: flex-end; align-items: flex-start; max-width: 100%; } @@ -37,7 +37,7 @@ justify-content: flex-end; align-items: flex-start; flex-grow: 1; - max-width: calc(~ '100% - ' @consonant-Select-width * 0.85 ~ ' - 8px'); + max-width: calc(~ '100% - ' @consonant-Select-width ~ ' - 8px'); &:first-child { max-width: 100%; @@ -157,7 +157,6 @@ &-selectWrapper { display: flex; justify-content: flex-end; - width: @consonant-Select-width * 0.85; margin-right: 8px; order: -1; overflow: visible; @@ -273,7 +272,6 @@ } &-selectWrapper { - max-width: @consonant-Select-width; order: 0; margin-right: 0; } @@ -316,13 +314,12 @@ &-selectWrapper { min-width: auto; - max-width: 160px; margin-right: 0; margin-left: 0; & > div:first-child > button { - padding-left: 12px; - padding-right: 12px; + // padding-left: 12px; + padding-right: 24px; border: 1px solid @consonantLightGrey200; border-radius: 4px; } @@ -331,7 +328,7 @@ & > div:first-child { &:after { - right: 12px; + right: 4px; } } } diff --git a/less/components/consonant/select.less b/less/components/consonant/select.less index acf15111..044e7d5d 100644 --- a/less/components/consonant/select.less +++ b/less/components/consonant/select.less @@ -134,8 +134,8 @@ margin-bottom: 0; &:after { - width: 4px; - height: 4px; + width: 6px; + height: 6px; border-color: @consonantDarkGrey400; } } @@ -148,6 +148,31 @@ max-width: 100%; } + &.sort-by-Select { + display: flex; + width: auto; + justify-content: flex-end; + align-items: baseline; + + label { + font-size: 13px; + width: auto; + padding-top: 2px; + text-align: right; + white-space: nowrap; + } + + .consonant-Select-btn { + max-width: none; + padding-left: 6px; + padding-right: 20px; + } + + &:after { + right: 4px; + } + } + @media @consonant-tablet-up { &--autoWidth { margin-right: 0; diff --git a/react/src/js/components/Consonant/Helpers/constants.js b/react/src/js/components/Consonant/Helpers/constants.js index 1398b717..ca09aa17 100644 --- a/react/src/js/components/Consonant/Helpers/constants.js +++ b/react/src/js/components/Consonant/Helpers/constants.js @@ -156,6 +156,7 @@ export const DEFAULT_CONFIG = { title: '', onErrorTitle: 'Sorry there was a system error.', onErrorDescription: 'Please try reloading the page or try coming back to the page another time.', + sortBy: 'Sort by:', sortByAria: 'Sort by {key}', removeFilterAria: 'Remove {filter} filter', removeAllFiltersAria: 'Remove {num} {filter} filters', diff --git a/react/src/js/components/Consonant/Sort/Popup.jsx b/react/src/js/components/Consonant/Sort/Popup.jsx index 55d22d65..af6e5124 100644 --- a/react/src/js/components/Consonant/Sort/Popup.jsx +++ b/react/src/js/components/Consonant/Sort/Popup.jsx @@ -57,6 +57,7 @@ const Popup = ({ **** Authored Configs **** */ const getConfig = useConfig(); + const sortBy = getConfig('collection', 'i18n.sortBy'); const sortByAria = getConfig('collection', 'i18n.sortByAria'); /** @@ -99,9 +100,11 @@ const Popup = ({ return (