Skip to content

Commit

Permalink
Reskin sorter
Browse files Browse the repository at this point in the history
  • Loading branch information
DarksightKellar committed Apr 19, 2024
1 parent 4c0bfc2 commit f5c0b5b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
3 changes: 2 additions & 1 deletion src/components/pages/DaoDashboard/Activities/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ export function Activities() {
return (
<Box>
<Flex
justifyContent="flex-end"
justifyContent="flex-start"
alignItems="center"
mx="0.5rem"
my="1rem"
>
<Sort
Expand Down
31 changes: 17 additions & 14 deletions src/components/ui/utils/Sort.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Flex, Menu, MenuButton, MenuItem, MenuList, Text } from '@chakra-ui/react';
import { ArrowDownSm } from '@decent-org/fractal-ui';
import { Divider, Flex, Icon, Menu, MenuButton, MenuItem, MenuList, Text } from '@chakra-ui/react';
import { CaretDown } from "@phosphor-icons/react";
import { Dispatch, SetStateAction } from 'react';
import { useTranslation } from 'react-i18next';
import { SortBy } from '../../../types';
Expand Down Expand Up @@ -45,27 +45,28 @@ export function Sort({ sortBy, setSortBy, buttonProps }: ISort) {
<Menu direction="ltr">
<MenuButton
data-testid="sort-openMenu"
color="gold.500"
color="lilac-0"
p="0.25rem 0.5rem"
sx={{
'&:hover': {
color: 'gold.500-hover',
color: 'lilac--1',
bg: 'white-alpha-04',
borderRadius: '0.25rem',
},
}}
{...buttonProps}
>
<Flex
alignItems="center"
color="gold.500"
>
<Text textStyle="text-sm-mono-medium">{t(sortBy)}</Text>
<ArrowDownSm boxSize="1.5rem" />
<Flex alignItems="center">
<Text>{t(sortBy)}</Text>
<Icon ml="0.25rem" p={1.25} as={CaretDown} />
</Flex>
</MenuButton>

<MenuList
border="none"
rounded="lg"
shadow="menu-gold"
bg="grayscale.black"
borderWidth="1px"
borderColor="neutral-3"
borderRadius="0.5rem"
bg="neutral-2" // neutral-2-84 ??
p="0.5rem 1rem"
minWidth="min-content"
zIndex={5}
Expand All @@ -75,6 +76,8 @@ export function Sort({ sortBy, setSortBy, buttonProps }: ISort) {
testId="sort-newest"
onClick={() => setSortBy(SortBy.Newest)}
/>
{/* TODO Divider look doesn't quite match */}
<Divider color="neutral-3" />
<SortMenuItem
labelKey={SortBy.Oldest}
testId="sort-oldest"
Expand Down

0 comments on commit f5c0b5b

Please sign in to comment.