Moved components to a new filters folder
This commit is contained in:
parent
4a0865c088
commit
8bde311a6d
4 changed files with 36 additions and 55 deletions
|
|
@ -3,6 +3,7 @@
|
||||||
background: var(--bar-bg);
|
background: var(--bar-bg);
|
||||||
border-radius: $card-corner;
|
border-radius: $card-corner;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.1);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
gap: $unit-2x;
|
gap: $unit-2x;
|
||||||
|
|
@ -27,14 +28,20 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.filters {
|
.filters {
|
||||||
display: flex;
|
display: grid;
|
||||||
|
grid-template-columns:
|
||||||
|
minmax($unit-20x, 1fr)
|
||||||
|
minmax($unit-20x, 1fr)
|
||||||
|
minmax($unit-20x, 1fr)
|
||||||
|
0.5fr;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
gap: $unit;
|
gap: $unit;
|
||||||
width: auto;
|
width: auto;
|
||||||
|
|
||||||
@include breakpoint(tablet) {
|
@include breakpoint(tablet) {
|
||||||
flex-direction: column;
|
grid-template-columns: 1fr;
|
||||||
|
grid-template-rows: auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -58,27 +65,4 @@
|
||||||
font-size: $font-small;
|
font-size: $font-small;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.UserInfo {
|
|
||||||
align-items: center;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
flex-grow: 1;
|
|
||||||
gap: $unit * 1.5;
|
|
||||||
|
|
||||||
img {
|
|
||||||
$diameter: $unit * 6;
|
|
||||||
border-radius: calc($diameter / 2);
|
|
||||||
height: $diameter;
|
|
||||||
width: $diameter;
|
|
||||||
|
|
||||||
&.gran {
|
|
||||||
background-color: #cee7fe;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.djeeta {
|
|
||||||
background-color: #ffe1fe;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -4,7 +4,7 @@ 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/filters/FilterModal'
|
||||||
import RaidCombobox from '~components/raids/RaidCombobox'
|
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'
|
||||||
|
|
@ -13,3 +13,14 @@
|
||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fields {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: $unit-2x;
|
||||||
|
padding: 0 $unit-4x;
|
||||||
|
|
||||||
|
@include breakpoint(phone) {
|
||||||
|
gap: $unit-4x;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -3,12 +3,9 @@ import { getCookie, setCookie } from 'cookies-next'
|
||||||
import { useRouter } from 'next/router'
|
import { useRouter } from 'next/router'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
||||||
import {
|
import { Dialog, DialogTrigger } from '~components/common/Dialog'
|
||||||
Dialog,
|
import DialogHeader from '~components/common/DialogHeader'
|
||||||
DialogTrigger,
|
import DialogFooter from '~components/common/DialogFooter'
|
||||||
DialogClose,
|
|
||||||
DialogTitle,
|
|
||||||
} from '~components/common/Dialog'
|
|
||||||
import DialogContent from '~components/common/DialogContent'
|
import DialogContent from '~components/common/DialogContent'
|
||||||
|
|
||||||
import Button from '~components/common/Button'
|
import Button from '~components/common/Button'
|
||||||
|
|
@ -20,7 +17,6 @@ import SelectItem from '~components/common/SelectItem'
|
||||||
|
|
||||||
import type { DialogProps } from '@radix-ui/react-dialog'
|
import type { DialogProps } from '@radix-ui/react-dialog'
|
||||||
|
|
||||||
import CrossIcon from '~public/icons/Cross.svg'
|
|
||||||
import styles from './index.module.scss'
|
import styles from './index.module.scss'
|
||||||
|
|
||||||
interface Props extends DialogProps {
|
interface Props extends DialogProps {
|
||||||
|
|
@ -389,20 +385,8 @@ const FilterModal = (props: Props) => {
|
||||||
onEscapeKeyDown={onEscapeKeyDown}
|
onEscapeKeyDown={onEscapeKeyDown}
|
||||||
onOpenAutoFocus={onOpenAutoFocus}
|
onOpenAutoFocus={onOpenAutoFocus}
|
||||||
>
|
>
|
||||||
<div className="DialogHeader" ref={headerRef}>
|
<DialogHeader title={t('modals.filters.title')} />
|
||||||
<div className="DialogTop">
|
<div className={styles.fields}>
|
||||||
<DialogTitle className="DialogTitle">
|
|
||||||
{t('modals.filters.title')}
|
|
||||||
</DialogTitle>
|
|
||||||
</div>
|
|
||||||
<DialogClose className="DialogClose" asChild>
|
|
||||||
<span>
|
|
||||||
<CrossIcon />
|
|
||||||
</span>
|
|
||||||
</DialogClose>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="Fields">
|
|
||||||
{chargeAttackField()}
|
{chargeAttackField()}
|
||||||
{fullAutoField()}
|
{fullAutoField()}
|
||||||
{autoGuardField()}
|
{autoGuardField()}
|
||||||
|
|
@ -415,21 +399,23 @@ const FilterModal = (props: Props) => {
|
||||||
{userQualityField()}
|
{userQualityField()}
|
||||||
{originalOnlyField()}
|
{originalOnlyField()}
|
||||||
</div>
|
</div>
|
||||||
<div className="DialogFooter" ref={footerRef}>
|
<DialogFooter
|
||||||
<div className="Left"></div>
|
ref={footerRef}
|
||||||
<div className="Right Buttons Spaced">
|
rightElements={[
|
||||||
<Button
|
<Button
|
||||||
blended={true}
|
blended={true}
|
||||||
|
key="clear"
|
||||||
text={t('modals.filters.buttons.clear')}
|
text={t('modals.filters.buttons.clear')}
|
||||||
onClick={resetFilters}
|
onClick={resetFilters}
|
||||||
/>
|
/>,
|
||||||
<Button
|
<Button
|
||||||
contained={true}
|
bound={true}
|
||||||
|
key="confirm"
|
||||||
text={t('modals.filters.buttons.confirm')}
|
text={t('modals.filters.buttons.confirm')}
|
||||||
onClick={saveFilters}
|
onClick={saveFilters}
|
||||||
/>
|
/>,
|
||||||
</div>
|
]}
|
||||||
</div>
|
/>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
)
|
)
|
||||||
Loading…
Reference in a new issue