Skip to content

Commit

Permalink
feat: added rounded corners
Browse files Browse the repository at this point in the history
  • Loading branch information
BLuEScioN committed Jan 31, 2025
1 parent ec7419e commit f97bc9d
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/_components/NewNavBar/CurrencySetting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function getCurrencyIcon(currency: Currency) {
) : null;
}

export const CurrencySetting = ({ isMobile }: { isMobile: boolean }) => {
export const CurrencySetting = ({ isMobile }: { isMobile?: boolean }) => {
const dispatch = useAppDispatch();
const selectedCurrency = useCurrency();
return (
Expand Down
12 changes: 12 additions & 0 deletions src/app/_components/NewNavBar/FeePopover.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { PopoverContent, PopoverRoot, PopoverTrigger } from '@/components/ui/popover';
import { Text } from '@/ui/Text';
import { Tooltip } from '@/ui/Tooltip';
import { CurvedCorner } from '@/ui/icons/CurvedCorner';
import StxIcon from '@/ui/icons/StxIcon';
import { Box, Flex, Icon, Separator, Stack, Tabs } from '@chakra-ui/react';
import { CaretDown, CaretUp, Info, Lightning } from '@phosphor-icons/react';
Expand Down Expand Up @@ -144,11 +145,22 @@ export const FeePopover = () => {
h={10}
alignItems="center"
justifyContent="center"
position="relative"
>
<Text fontSize="xs" fontFamily="var(--font-matter-mono)">
Fees: 0.18 STX
</Text>
<Icon>{open ? <CaretUp /> : <CaretDown />}</Icon>
{open && (
<CurvedCorner
color="var(--stacks-colors-surface-primary)"
position="absolute"
bottom={'-1px'}
left={`${-4 * 4 + 1}px`}
h={4}
w={4}
/>
)}
</Flex>
</PopoverTrigger>
<PopoverContent
Expand Down
11 changes: 11 additions & 0 deletions src/app/_components/NewNavBar/SettingsPopover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { useState } from 'react';
import { CurrencySetting } from './CurrencySetting';
import { NetworkSetting } from './NetworkSetting';
import { ThemeSetting } from './ThemeSetting';
import { CurvedCorner } from '@/ui/icons/CurvedCorner';

export const SettingsPopover = () => {
const [open, setOpen] = useState(false);
Expand Down Expand Up @@ -37,6 +38,16 @@ export const SettingsPopover = () => {
{open ? <X /> : <GearFine />}
</Icon>
</Flex>
{open && (
<CurvedCorner
color="var(--stacks-colors-surface-primary)"
position="absolute"
bottom={'-1px'}
left={`${-4 * 4 + 1}px`}
h={4}
w={4}
/>
)}
</Box>
</PopoverTrigger>
<PopoverContent
Expand Down
14 changes: 14 additions & 0 deletions src/ui/icons/CurvedCorner.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Icon, IconProps } from '@chakra-ui/react';

export const CurvedCorner = ({ color, ...rest }: IconProps) => {
return (
<Icon {...rest}>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22" fill="none">
<path
d="M16.4597 15.9019C21.0891 11.2725 21.7683 0 21.7683 0V21.2105H0.5578C0.5578 21.2105 11.8303 20.5313 16.4597 15.9019Z"
fill={(color as string) ?? '#EAE8E6'}
/>
</svg>
</Icon>
);
};

0 comments on commit f97bc9d

Please sign in to comment.