feat: add correct alignment for filters depending on breakpoint

This commit is contained in:
marcelines 2023-06-07 14:13:21 +01:00
parent ddcddbac35
commit a35371dc60
No known key found for this signature in database
GPG Key ID: 56B1E53E2A3F43C7
2 changed files with 11 additions and 5 deletions

View File

@ -4,6 +4,8 @@ import { Avatar, Button, Input, Text } from '@status-im/components'
import { DropdownMenu } from '@status-im/components/src/dropdown-menu'
import { DropdownIcon, SearchIcon } from '@status-im/icons'
import { useCurrentBreakpoint } from '@/hooks/use-current-breakpoint'
import { ColorCircle } from './components/color-circle'
import type { ColorTokens } from '@tamagui/core'
@ -54,6 +56,8 @@ const FilterWithCheckboxes = (props: Props) => {
const [selectedValues, setSelectedValues] = useState<number[]>([])
const [isOpen, setIsOpen] = useState(false)
const currentBreakpoint = useCurrentBreakpoint()
return (
<div className={noPadding ? '' : 'pr-2'}>
<DropdownMenu onOpenChange={() => setIsOpen(!isOpen)}>
@ -72,7 +76,10 @@ const FilterWithCheckboxes = (props: Props) => {
>
{label}
</Button>
<DropdownMenu.Content sideOffset={10} align="end">
<DropdownMenu.Content
sideOffset={10}
align={currentBreakpoint === '2xl' ? 'end' : 'start'}
>
<div className="p-2 px-1">
<Input
placeholder="Find epics"

View File

@ -9,15 +9,14 @@ const WorkstreamDetailPage: Page = () => {
<div className="border-neutral-10 border-b px-5 py-3">
<Breadcrumbs />
</div>
<div className="px-10 py-6">
<div className="border-neutral-10 border-b px-10 py-6">
<EpicOverview
title="Communities protocol"
description="Detecting keycard reader removal for the beginning of each flow"
fullscreen
/>
<div role="separator" className="bg-neutral-10 -mx-6 my-6 h-px" />
</div>
<div className="border-neutral-10 border-b px-10 py-6">
<TableIssues />
</div>
</div>