Update filter bar button
This commit is contained in:
parent
6a9da8e2d8
commit
3f70a78838
2 changed files with 15 additions and 66 deletions
|
|
@ -30,7 +30,6 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
flex-grow: 1;
|
|
||||||
gap: $unit;
|
gap: $unit;
|
||||||
width: auto;
|
width: auto;
|
||||||
|
|
||||||
|
|
@ -38,24 +37,6 @@
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Button.Filter.Blended {
|
|
||||||
&.FiltersActive .Accessory svg {
|
|
||||||
fill: var(--accent-blue);
|
|
||||||
stroke: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background: var(--button-bg);
|
|
||||||
}
|
|
||||||
|
|
||||||
.Accessory svg {
|
|
||||||
fill: none;
|
|
||||||
stroke: var(--button-text);
|
|
||||||
width: 18px;
|
|
||||||
height: 18px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&.shadow {
|
&.shadow {
|
||||||
|
|
@ -70,29 +51,6 @@
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
select,
|
|
||||||
.SelectTrigger {
|
|
||||||
// background: url("/icons/Chevron.svg"), $grey-90;
|
|
||||||
// background-repeat: no-repeat;
|
|
||||||
// background-position-y: center;
|
|
||||||
// background-position-x: 95%;
|
|
||||||
// background-size: $unit * 1.5;
|
|
||||||
background-color: var(--select-contained-bg);
|
|
||||||
font-size: $font-small;
|
|
||||||
margin: 0;
|
|
||||||
max-width: 200px;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background-color: var(--select-contained-bg-hover);
|
|
||||||
}
|
|
||||||
|
|
||||||
@include breakpoint(tablet) {
|
|
||||||
width: 100%;
|
|
||||||
max-width: inherit;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.SelectTrigger {
|
.SelectTrigger {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
|
|
@ -101,23 +59,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.Filter.Button {
|
|
||||||
justify-content: center;
|
|
||||||
|
|
||||||
.Text {
|
|
||||||
display: none;
|
|
||||||
width: auto;
|
|
||||||
|
|
||||||
@include breakpoint(tablet) {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
@include breakpoint(phone) {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.UserInfo {
|
.UserInfo {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,20 @@
|
||||||
import React, { useEffect, useState } from 'react'
|
import React, { useEffect, useState } from 'react'
|
||||||
import { useTranslation } from 'next-i18next'
|
import { useTranslation } from 'next-i18next'
|
||||||
|
import { getCookie } from 'cookies-next'
|
||||||
import classNames from 'classnames'
|
import classNames from 'classnames'
|
||||||
import equals from 'fast-deep-equal'
|
import equals from 'fast-deep-equal'
|
||||||
|
|
||||||
import FilterModal from '~components/FilterModal'
|
import FilterModal from '~components/FilterModal'
|
||||||
|
import RaidCombobox from '~components/raids/RaidCombobox'
|
||||||
import Select from '~components/common/Select'
|
import Select from '~components/common/Select'
|
||||||
import SelectItem from '~components/common/SelectItem'
|
import SelectItem from '~components/common/SelectItem'
|
||||||
import Button from '~components/common/Button'
|
import Button from '~components/common/Button'
|
||||||
|
|
||||||
|
import { appState } from '~utils/appState'
|
||||||
import { defaultFilterset } from '~utils/defaultFilters'
|
import { defaultFilterset } from '~utils/defaultFilters'
|
||||||
|
|
||||||
import FilterIcon from '~public/icons/Filter.svg'
|
import FilterIcon from '~public/icons/Filter.svg'
|
||||||
|
|
||||||
import styles from './index.module.scss'
|
import styles from './index.module.scss'
|
||||||
import { getCookie } from 'cookies-next'
|
|
||||||
import RaidCombobox from '~components/raids/RaidCombobox'
|
|
||||||
import { appState } from '~utils/appState'
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
children: React.ReactNode
|
children: React.ReactNode
|
||||||
|
|
@ -46,8 +45,8 @@ const FilterBar = (props: Props) => {
|
||||||
})
|
})
|
||||||
|
|
||||||
const filterButtonClasses = classNames({
|
const filterButtonClasses = classNames({
|
||||||
Filter: true,
|
filter: true,
|
||||||
FiltersActive: !matchesDefaultFilters,
|
filtersActive: !matchesDefaultFilters,
|
||||||
})
|
})
|
||||||
|
|
||||||
// Convert raid slug to Raid object on mount
|
// Convert raid slug to Raid object on mount
|
||||||
|
|
@ -129,6 +128,10 @@ const FilterBar = (props: Props) => {
|
||||||
<div className={styles.filters}>
|
<div className={styles.filters}>
|
||||||
<Select
|
<Select
|
||||||
value={`${props.element}`}
|
value={`${props.element}`}
|
||||||
|
trigger={{
|
||||||
|
bound: true,
|
||||||
|
size: 'small',
|
||||||
|
}}
|
||||||
overlayVisible={false}
|
overlayVisible={false}
|
||||||
open={elementOpen}
|
open={elementOpen}
|
||||||
onOpenChange={() => onSelectChange('element')}
|
onOpenChange={() => onSelectChange('element')}
|
||||||
|
|
@ -142,12 +145,16 @@ const FilterBar = (props: Props) => {
|
||||||
currentRaid={currentRaid}
|
currentRaid={currentRaid}
|
||||||
showAllRaidsOption={true}
|
showAllRaidsOption={true}
|
||||||
minimal={true}
|
minimal={true}
|
||||||
|
size="small"
|
||||||
onChange={raidSelectChanged}
|
onChange={raidSelectChanged}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Select
|
<Select
|
||||||
value={`${props.recency}`}
|
value={`${props.recency}`}
|
||||||
trigger={'All time'}
|
trigger={{
|
||||||
|
bound: true,
|
||||||
|
size: 'small',
|
||||||
|
}}
|
||||||
overlayVisible={false}
|
overlayVisible={false}
|
||||||
open={recencyOpen}
|
open={recencyOpen}
|
||||||
onOpenChange={() => onSelectChange('recency')}
|
onOpenChange={() => onSelectChange('recency')}
|
||||||
|
|
@ -182,6 +189,7 @@ const FilterBar = (props: Props) => {
|
||||||
blended={true}
|
blended={true}
|
||||||
leftAccessoryIcon={<FilterIcon />}
|
leftAccessoryIcon={<FilterIcon />}
|
||||||
text={t('filters.name')}
|
text={t('filters.name')}
|
||||||
|
size="small"
|
||||||
onClick={() => setFilterModalOpen(true)}
|
onClick={() => setFilterModalOpen(true)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue