Skip to content

Commit c99fd22

Browse files
committed
fix by PR feedback
1 parent 58c68ce commit c99fd22

File tree

10 files changed

+177
-96
lines changed

10 files changed

+177
-96
lines changed

theme/components/Button/Button.ts

+24-15
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,24 @@ const variantSolid = defineStyle((props) => {
88

99
const bg = mode('blackAlpha.800', 'grey.10')(props);
1010
const color = 'white';
11-
const hoverBg = mode('blackAlpha.800', 'grey.10')(props);
11+
const hoverBg = mode('blackAlpha.800', 'white')(props);
12+
const hoverColor = mode('blackAlpha.800', 'black')(props);
1213
const activeBg = hoverBg;
1314

1415
return {
1516
bg,
1617
color,
1718
_hover: {
19+
color: hoverColor,
1820
bg: hoverBg,
1921
_disabled: {
20-
bg,
22+
bg: "black",
23+
color: "grey.50"
2124
},
2225
},
2326
_disabled: {
24-
opacity: 0.2,
27+
bg: "black",
28+
color: "grey.50"
2529
},
2630
// According to design there is no "active" or "pressed" state
2731
// It is simply should be the same as the "hover" state
@@ -38,10 +42,10 @@ const variantOutline = defineStyle((props) => {
3842

3943
const bg = 'transparent';
4044

41-
const color = isGrayTheme ? mode('blackAlpha.800', 'whiteAlpha.800')(props) : mode(`${ c }.600`, `${ c }.300`)(props);
42-
const borderColor = isGrayTheme ? mode('gray.200', 'grey.10')(props) : mode(`${ c }.600`, `${ c }.300`)(props);
45+
const color = isGrayTheme ? mode('blackAlpha.800', 'white')(props) : mode(`${ c }.600`, `${ c }.300`)(props);
46+
const borderColor = isGrayTheme ? mode('gray.200', 'grey.30')(props) : mode(`${ c }.600`, `${ c }.300`)(props);
4347

44-
const selectedBg = isGrayTheme ? mode('blue.50', 'grey.10')(props) : mode(`${ c }.50`, 'gray.600')(props);
48+
const selectedBg = isGrayTheme ? mode('blue.50', 'grey.30')(props) : mode(`${ c }.50`, 'gray.600')(props);
4549
const selectedColor = mode('blue.600', 'gray.50')(props);
4650

4751
return {
@@ -52,9 +56,9 @@ const variantOutline = defineStyle((props) => {
5256
borderColor: isPurple ? 'cyan' : borderColor,
5357
bg,
5458
_hover: {
55-
color: 'link_hovered',
56-
borderColor: 'link_hovered',
57-
bg,
59+
color,
60+
borderColor: color,
61+
bg: 'grey.30',
5862
span: {
5963
color: 'link_hovered',
6064
},
@@ -69,8 +73,8 @@ const variantOutline = defineStyle((props) => {
6973
// According to design there is no "active" or "pressed" state
7074
// It is simply should be the same as the "hover" state
7175
_active: {
72-
color: 'link_hovered',
73-
borderColor: 'link_hovered',
76+
color,
77+
borderColor: color,
7478
bg,
7579
span: {
7680
color: 'link_hovered',
@@ -98,16 +102,20 @@ const variantRadioGroup = defineStyle((props) => {
98102
const outline = runIfFn(variantOutline, props);
99103
const bgColor = mode('blue.50', 'gray.800')(props);
100104
const selectedTextColor = mode('blue.700', 'gray.50')(props);
105+
const hoverTextColor = mode('blue.700', 'black')(props);
106+
const hoverBgColor = mode('blue.700', 'white')(props);
107+
101108

102109
return {
103110
...outline,
104-
fontWeight: 500,
111+
fontWeight: 400,
105112
cursor: 'pointer',
106113
bgColor: 'none',
107114
borderColor: bgColor,
108115
_hover: {
116+
bg: hoverBgColor,
109117
borderColor: bgColor,
110-
color: 'link_hovered',
118+
color: hoverTextColor,
111119
},
112120
_active: {
113121
bgColor: 'none',
@@ -288,10 +296,11 @@ const sizes = {
288296
px: 4,
289297
}),
290298
sm: defineStyle({
291-
h: 8,
299+
h: 'unset',
292300
minW: 'unset',
293301
fontSize: 'sm',
294-
px: 3,
302+
py: '12px',
303+
px: '24px'
295304
}),
296305
xs: defineStyle({
297306
h: 6,

theme/components/Tabs.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import Button from './Button/Button';
1111
const variantSoftRounded = definePartsStyle((props) => {
1212
return {
1313
tab: {
14+
fontWeight: 400,
1415
borderRadius: 'base',
1516
color: mode('purple.300', 'white')(props),
1617
_selected: {
@@ -22,7 +23,8 @@ const variantSoftRounded = definePartsStyle((props) => {
2223
},
2324
},
2425
_hover: {
25-
color: 'link_hovered',
26+
color: mode('white', 'black')(props),
27+
bg: mode('purple.200', 'white')(props),
2628
},
2729
_focusVisible: {
2830
boxShadow: { base: 'none', lg: 'outline' },
@@ -70,7 +72,7 @@ const sizes = {
7072
tab: Button.sizes?.sm,
7173
}),
7274
md: definePartsStyle({
73-
tab: Button.sizes?.md,
75+
tab: Button.sizes?.sm,
7476
}),
7577
};
7678

theme/foundations/borders.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const borders = {
22
radii: {
33
none: '0',
44
sm: '4px',
5-
base: '8px',
5+
base: '12px',
66
md: '12px',
77
lg: '16px',
88
xl: '24px',

ui/address/details/AddressQrCode.tsx

+7-11
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
Box,
1212
useDisclosure,
1313
Tooltip,
14-
IconButton,
14+
Text,
1515
} from '@chakra-ui/react';
1616
import { useRouter } from 'next/router';
1717
import QRCode from 'qrcode';
@@ -24,7 +24,6 @@ import * as mixpanel from 'lib/mixpanel/index';
2424
import { useRollbar } from 'lib/rollbar';
2525
import Skeleton from 'ui/shared/chakra/Skeleton';
2626
import AddressEntity from 'ui/shared/entities/address/AddressEntity';
27-
import IconSvg from 'ui/shared/IconSvg';
2827

2928
const SVG_OPTIONS = {
3029
margin: 0,
@@ -70,17 +69,14 @@ const AddressQrCode = ({ address, className, isLoading }: Props) => {
7069
return (
7170
<>
7271
<Tooltip label="Click to view QR code">
73-
<IconButton
72+
<Text
7473
className={ className }
75-
aria-label="Show QR code"
76-
variant="outline"
77-
size="sm"
78-
pl="6px"
79-
pr="6px"
8074
onClick={ onOpen }
81-
icon={ <IconSvg name="qr_code" boxSize={ 5 }/> }
82-
flexShrink={ 0 }
83-
/>
75+
fontSize="14px"
76+
color="grey.50"
77+
>
78+
Click to See QR Code
79+
</Text>
8480
</Tooltip>
8581

8682
{ error && (

ui/shared/filters/FilterButton.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import React from 'react';
55
import Skeleton from 'ui/shared/chakra/Skeleton';
66
import IconSvg from 'ui/shared/IconSvg';
77

8-
const FilterIcon = <IconSvg name="filter" boxSize={ 5 } mr={{ base: 0, lg: 2 }}/>;
8+
const FilterIcon = <IconSvg name="filter" boxSize={ 5 } ml={{ base: 0, lg: 2 }}/>;
99

1010
interface Props {
1111
isActive?: boolean;
@@ -39,25 +39,25 @@ const FilterButton = ({ isActive, isLoading, appliedFiltersNum, onClick, as }: P
3939
ref={ ref }
4040
rightIcon={ appliedFiltersNum ? num : undefined }
4141
size="sm"
42-
fontWeight="500"
4342
variant="outline"
4443
colorScheme="gray"
4544
onClick={ onClick }
4645
isActive={ isActive }
4746
data-selected={ Boolean(appliedFiltersNum) }
48-
px={ 1.5 }
49-
flexShrink={ 0 }
5047
as={ as }
48+
px="12px"
49+
py="8px"
50+
fontWeight={400}
5151
pointerEvents="all"
5252
_hover={ isActive ? {
53-
color: 'link_hovered',
53+
color: 'white',
5454
'.AppliedFiltersNum': {
5555
bg: 'link_hovered',
5656
},
5757
} : undefined }
5858
>
59-
{ FilterIcon }
6059
<Box display={{ base: 'none', lg: 'block' }}>Filter</Box>
60+
{ FilterIcon }
6161
</Button>
6262
);
6363
};

ui/shared/pagination/Pagination.tsx

+16-7
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@ const Pagination = ({ page, onNextPageClick, onPrevPageClick, resetPage, hasPage
2626
>
2727
<Skeleton isLoaded={ !showSkeleton } display="inline-block" mr={ 4 } borderRadius="base">
2828
<Button
29-
variant="outline"
3029
size="sm"
30+
px="24px"
31+
py="12px"
32+
h={ 9 }
33+
fontWeight={ 400 }
3134
onClick={ resetPage }
3235
isDisabled={ page === 1 || isLoading }
3336
>
@@ -36,23 +39,26 @@ const Pagination = ({ page, onNextPageClick, onPrevPageClick, resetPage, hasPage
3639
</Skeleton>
3740
<Skeleton isLoaded={ !showSkeleton } display="inline-block" mr={ 3 } borderRadius="base">
3841
<IconButton
39-
variant="outline"
4042
onClick={ onPrevPageClick }
4143
size="sm"
44+
px="24px"
45+
py="12px"
46+
fontWeight={ 400 }
4247
aria-label="Prev page"
4348
w="36px"
49+
h={ 9 }
4450
icon={ <IconSvg name="arrows/east-mini" w={ 5 } h={ 5 }/> }
4551
isDisabled={ !canGoBackwards || isLoading }
4652
/>
4753
</Skeleton>
4854
<Skeleton isLoaded={ !showSkeleton } display="inline-block" borderRadius="base">
4955
<Button
50-
variant="outline"
5156
size="sm"
52-
data-selected={ true }
53-
borderWidth="1px"
57+
px="24px"
58+
py="12px"
5459
fontWeight={ 400 }
55-
h={ 8 }
60+
data-selected={ true }
61+
h={ 9 }
5662
minW="36px"
5763
cursor="unset"
5864
>
@@ -61,8 +67,11 @@ const Pagination = ({ page, onNextPageClick, onPrevPageClick, resetPage, hasPage
6167
</Skeleton>
6268
<Skeleton isLoaded={ !showSkeleton } display="inline-block" ml={ 3 } borderRadius="base">
6369
<IconButton
64-
variant="outline"
6570
onClick={ onNextPageClick }
71+
px="24px"
72+
py="12px"
73+
h={ 9 }
74+
fontWeight={ 400 }
6675
size="sm"
6776
aria-label="Next page"
6877
w="36px"

ui/snippets/navigation/useNavLinkStyleProps.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ export default function useNavLinkProps({ isExpanded, isCollapsed, isActive }: P
1313

1414
return {
1515
itemProps: {
16-
py: '9px',
1716
display: 'flex',
1817
color: isActive ? colors.text.active : colors.text.default,
1918
bgColor: isActive ? colors.bg.active : colors.bg.default,

ui/snippets/navigation/vertical/NavLink.tsx

+18-11
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import useIsMobile from 'lib/hooks/useIsMobile';
1010
import { isInternalItem } from 'lib/hooks/useNavItems';
1111
import IconSvg from 'ui/shared/IconSvg';
1212

13-
import LightningLabel, { LIGHTNING_LABEL_CLASS_NAME } from '../LightningLabel';
13+
import LightningLabel from '../LightningLabel';
1414
import NavLinkIcon from '../NavLinkIcon';
1515
import useColors from '../useColors';
1616
import useNavLinkStyleProps from '../useNavLinkStyleProps';
@@ -21,9 +21,11 @@ type Props = {
2121
onClick?: (e: React.MouseEvent) => void;
2222
isCollapsed?: boolean;
2323
isDisabled?: boolean;
24+
isMainNav?: boolean
25+
onMouseOver?: () => void
2426
};
2527

26-
const NavLink = ({ item, onClick, isCollapsed, isDisabled }: Props) => {
28+
const NavLink = ({ item, onClick, isCollapsed, isMainNav, onMouseOver }: Props) => {
2729
const isMobile = useIsMobile();
2830
const colors = useColors();
2931

@@ -44,17 +46,17 @@ const NavLink = ({ item, onClick, isCollapsed, isDisabled }: Props) => {
4446
{ ...styleProps.itemProps }
4547
display="flex"
4648
position="relative"
47-
mr={ 3 }
48-
px={ 2 }
49-
py={ 1 }
49+
px={ !isMainNav ? "12px" : "24px" }
50+
py={ !isMainNav ? "12px" : "12px"}
5051
aria-label={ `${ item.text } link` }
52+
fontSize="12px"
5153
whiteSpace="nowrap"
5254
onClick={ onClick }
5355
_hover={{
54-
[`& *:not(.${ LIGHTNING_LABEL_CLASS_NAME }, .${ LIGHTNING_LABEL_CLASS_NAME } *)`]: {
55-
color: isDisabled ? 'inherit' : 'link_hovered',
56-
},
56+
bg: "grey.20",
57+
borderRadius: "14px"
5758
}}
59+
onMouseOver={onMouseOver}
5860
>
5961
<Tooltip
6062
label={ item.text }
@@ -67,10 +69,15 @@ const NavLink = ({ item, onClick, isCollapsed, isDisabled }: Props) => {
6769
margin={ 0 }
6870
>
6971
<HStack spacing={ 0 } overflow="hidden">
70-
<NavLinkIcon item={ item }/>
71-
<Text { ...styleProps.textProps } as="span" ml={ 3 }>
72+
{/*@ts-ignore*/}
73+
{!isMainNav && (item.icon || item.iconComponent) &&
74+
<Box w={{ base: '36px', lg: '36px' }} display="flex" borderRadius="10px" bg="black" p="6px">
75+
<NavLinkIcon boxSize="24px" item={ item } color="rgba(255, 255, 255, 0.5)"/>
76+
</Box>
77+
}
78+
<Text { ...styleProps.textProps } as="span" ml={ !isMainNav ? 3 : 0 }>
7279
<span>{ item.text }</span>
73-
{ !isInternalLink && <IconSvg name="link_external" boxSize={ 3 } color="icon_link_external" verticalAlign="middle"/> }
80+
{ !isInternalLink && <IconSvg name="link_external" boxSize={ 3 } color="grey.50" verticalAlign="middle"/> }
7481
</Text>
7582
{ isHighlighted && (
7683
<LightningLabel iconColor={ styleProps.itemProps.bgColor } isCollapsed={ isCollapsed }/>

0 commit comments

Comments
 (0)