1
- import React from "react"
2
1
import { PiMagnifyingGlass } from "react-icons/pi"
3
- import { Box , Button , Flex , Icon , Text } from "@chakra-ui/react"
4
2
5
- import { SimulatorNavProps } from "@/lib/types"
3
+ import type { SimulatorNavProps } from "@/lib/types"
4
+
5
+ import EthTokenIconGrayscale from "@/components/Simulator/icons/eth-token-icon-grayscale.svg"
6
+ import QrCodeIcon from "@/components/Simulator/icons/qr-code-icon.svg"
7
+ import { Button } from "@/components/ui/buttons/Button"
8
+ import { Stack } from "@/components/ui/flex"
6
9
7
- import { EthTokenIconGrayscale , QrCodeIcon } from "../../icons"
8
10
import { NotificationPopover } from "../../NotificationPopover"
9
11
import { CategoryTabs } from "../../WalletHome/CategoryTabs"
10
12
@@ -23,85 +25,47 @@ export const SendFromContacts = ({
23
25
}
24
26
return (
25
27
< >
26
- < Box py = { 8 } px = { 6 } >
27
- < Text fontSize = { { base : "xl" , md : "2xl" } } fontWeight = "bold" mb = { 8 } >
28
- Choose recipient
29
- </ Text >
28
+ < div className = "px-6 py-8" >
29
+ < p className = "mb-8 text-xl font-bold md:text-2xl" > Choose recipient</ p >
30
30
< NotificationPopover
31
31
title = "Example walkthrough"
32
32
content = { `Choose ${ CONTACTS [ 0 ] . name } from recent contacts` }
33
33
>
34
34
< Button
35
35
variant = "outline"
36
- leftIcon = { < Icon as = { PiMagnifyingGlass } /> }
37
- rightIcon = { < Icon as = { QrCodeIcon } /> }
38
- color = "disabled"
39
- py = { 4 }
40
- w = "full"
41
- _hover = { {
42
- color : "disabled" ,
43
- borderColor : "disabled" ,
44
- } }
45
- cursor = "auto"
36
+ className = "w-full cursor-auto border-disabled py-4 text-disabled hover:!text-disabled hover:shadow-none"
46
37
>
47
- < Text as = "span" me = "auto" >
48
- Address or contacts
49
- </ Text >
38
+ < PiMagnifyingGlass / >
39
+ < span className = "me-auto" > Address or contacts</ span >
40
+ < QrCodeIcon className = "text-lg text-disabled" / >
50
41
</ Button >
51
42
</ NotificationPopover >
52
- </ Box >
53
- < Box py = { 8 } px = { 6 } bg = " background. highlight" h = "full ">
43
+ </ div >
44
+ < div className = "h-full bg- background- highlight px-6 py-8 ">
54
45
< CategoryTabs
55
46
categories = { [ "My contacts" , "Recent" ] }
56
47
activeIndex = { 1 }
57
48
mb = { 4 }
58
49
/>
59
- < Flex direction = "column" gap = { 4 } >
50
+ < Stack className = " gap-4" >
60
51
{ CONTACTS . map ( ( { name, lastAction } , i ) => (
61
52
< Button
62
53
key = { name + i }
63
- leftIcon = {
64
- < Icon
65
- as = { EthTokenIconGrayscale }
66
- fill = "black"
67
- w = "30px"
68
- h = "30px"
69
- />
70
- }
71
- isDisabled = { i > 0 }
72
- gap = { 2 }
73
- _disabled = { {
74
- color : "body.base" ,
75
- bg : "background.base" ,
76
- pointerEvents : "none" ,
77
- } }
78
- data-group
54
+ disabled = { i > 0 }
55
+ className = "group gap-2 disabled:bg-background disabled:text-body hover:[&_path]:fill-primary-hover"
79
56
onClick = { ( ) => handleSelection ( name ) }
80
57
>
81
- < Box as = "span" flex = { 1 } >
82
- < Text
83
- as = "span"
84
- display = "block"
85
- fontWeight = "bold"
86
- textAlign = "start"
87
- >
88
- { name }
89
- </ Text >
90
- < Text
91
- as = "span"
92
- display = "block"
93
- color = "body.light"
94
- textAlign = "start"
95
- _groupDisabled = { { color : "body.medium" } }
96
- fontSize = "sm"
97
- >
58
+ < EthTokenIconGrayscale className = "text-[30px]" />
59
+ < span className = "flex-1" >
60
+ < span className = "block text-start font-bold" > { name } </ span >
61
+ < span className = "block text-start text-sm text-white group-disabled:text-body-medium" >
98
62
{ lastAction }
99
- </ Text >
100
- </ Box >
63
+ </ span >
64
+ </ span >
101
65
</ Button >
102
66
) ) }
103
- </ Flex >
104
- </ Box >
67
+ </ Stack >
68
+ </ div >
105
69
</ >
106
70
)
107
71
}
0 commit comments