Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
29a2b631
Commit
29a2b631
authored
Jun 21, 2022
by
Natalia Stus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
поменял поведение таблицы
parent
1abfc6b4
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
32 additions
and
10 deletions
+32
-10
WatchListAddressItem.tsx
components/WatchlistTable/WatchListAddressItem.tsx
+2
-2
WatchListTableItem.tsx
components/WatchlistTable/WatchListTableItem.tsx
+5
-1
WatchlistTable.tsx
components/WatchlistTable/WatchlistTable.tsx
+5
-5
watchlist.ts
data/watchlist.ts
+1
-1
Table.ts
theme/components/Table.ts
+4
-1
Tag.ts
theme/components/Tag.ts
+13
-0
index.ts
theme/components/index.ts
+2
-0
No files found.
components/WatchlistTable/WatchListAddressItem.tsx
View file @
29a2b631
...
@@ -12,9 +12,9 @@ const WatchListAddressItem = ({ item }: {item: TWatchlistItem}) => {
...
@@ -12,9 +12,9 @@ const WatchListAddressItem = ({ item }: {item: TWatchlistItem}) => {
return
(
return
(
<
HStack
spacing=
"12px"
align=
"top"
>
<
HStack
spacing=
"12px"
align=
"top"
>
<
Image
src=
"/acc.png"
alt=
"Account Image"
w=
"50px"
h=
"50px"
/>
<
Image
src=
"/acc.png"
alt=
"Account Image"
w=
"50px"
h=
"50px"
/>
<
VStack
align=
"stretch"
>
<
VStack
align=
"stretch"
overflow=
"hidden"
>
<
HStack
spacing=
"8px"
alignContent=
"center"
>
<
HStack
spacing=
"8px"
alignContent=
"center"
>
<
Link
href=
"#"
color=
"blue.500"
>
<
Link
href=
"#"
color=
"blue.500"
title=
{
item
.
address
}
overflow=
"hidden"
textOverflow=
"ellipsis"
>
{
item
.
address
}
{
item
.
address
}
</
Link
>
</
Link
>
<
CopyToClipboard
text=
{
item
.
address
}
/>
<
CopyToClipboard
text=
{
item
.
address
}
/>
...
...
components/WatchlistTable/WatchListTableItem.tsx
View file @
29a2b631
...
@@ -34,7 +34,11 @@ const WatchlistTableItem = ({ item, onEditClick, onDeleteClick }: Props) => {
...
@@ -34,7 +34,11 @@ const WatchlistTableItem = ({ item, onEditClick, onDeleteClick }: Props) => {
return
(
return
(
<
Tr
alignItems=
"top"
key=
{
item
.
address
}
>
<
Tr
alignItems=
"top"
key=
{
item
.
address
}
>
<
Td
><
WatchListAddressItem
item=
{
item
}
/></
Td
>
<
Td
><
WatchListAddressItem
item=
{
item
}
/></
Td
>
<
Td
><
Tag
>
{
item
.
tag
}
</
Tag
></
Td
>
<
Td
>
<
Tag
lineHeight=
"24px"
title=
{
item
.
tag
}
>
{
item
.
tag
}
</
Tag
>
</
Td
>
<
Td
><
Switch
colorScheme=
"green"
size=
"md"
isChecked=
{
item
.
notification
}
/></
Td
>
<
Td
><
Switch
colorScheme=
"green"
size=
"md"
isChecked=
{
item
.
notification
}
/></
Td
>
<
Td
>
<
Td
>
<
HStack
spacing=
"30px"
>
<
HStack
spacing=
"30px"
>
...
...
components/WatchlistTable/WatchlistTable.tsx
View file @
29a2b631
...
@@ -22,13 +22,13 @@ interface Props {
...
@@ -22,13 +22,13 @@ interface Props {
const
WatchlistTable
=
({
data
,
onDeleteClick
,
onEditClick
}:
Props
)
=>
{
const
WatchlistTable
=
({
data
,
onDeleteClick
,
onEditClick
}:
Props
)
=>
{
return
(
return
(
<
TableContainer
width=
"100%"
>
<
TableContainer
width=
"100%"
>
<
Table
variant=
"simple"
>
<
Table
variant=
"simple"
minWidth=
"600px"
>
<
Thead
>
<
Thead
>
<
Tr
>
<
Tr
>
<
Th
>
Address
</
Th
>
<
Th
width=
"70%"
overflow=
"hidden"
>
Address
</
Th
>
<
Th
>
Private tag
</
Th
>
<
Th
width=
"30%"
overflow=
"hidden"
>
Private tag
</
Th
>
<
Th
>
Notification
</
Th
>
<
Th
width=
"108px"
overflow=
"hidden"
>
Notification
</
Th
>
<
Th
></
Th
>
<
Th
width=
"108px"
overflow=
"hidden"
></
Th
>
</
Tr
>
</
Tr
>
</
Thead
>
</
Thead
>
<
Tbody
>
<
Tbody
>
...
...
data/watchlist.ts
View file @
29a2b631
...
@@ -22,7 +22,7 @@ export const watchlist = [
...
@@ -22,7 +22,7 @@ export const watchlist = [
tokenBalance
:
200.2
,
tokenBalance
:
200.2
,
tokenBalanceUSD
:
202.4
,
tokenBalanceUSD
:
202.4
,
totalUSD
:
3000.5
,
totalUSD
:
3000.5
,
tag
:
'
some_other_tag
'
,
tag
:
'
12345678901234567890123456789012345
'
,
notification
:
false
,
notification
:
false
,
},
},
];
];
...
...
theme/components/Table.ts
View file @
29a2b631
...
@@ -6,7 +6,7 @@ const firstLastStyle = {
...
@@ -6,7 +6,7 @@ const firstLastStyle = {
}
}
const
Table
:
ComponentMultiStyleConfig
=
{
const
Table
:
ComponentMultiStyleConfig
=
{
parts
:
[
'
th
'
,
'
td
'
],
parts
:
[
'
th
'
,
'
td
'
,
'
table
'
],
baseStyle
:
{
baseStyle
:
{
th
:
{
th
:
{
...
firstLastStyle
,
...
firstLastStyle
,
...
@@ -18,6 +18,9 @@ const Table: ComponentMultiStyleConfig = {
...
@@ -18,6 +18,9 @@ const Table: ComponentMultiStyleConfig = {
fontSize
:
'
md
'
,
fontSize
:
'
md
'
,
verticalAlign
:
'
top
'
,
verticalAlign
:
'
top
'
,
},
},
table
:
{
tableLayout
:
'
fixed
'
,
},
},
},
}
}
...
...
theme/components/Tag.ts
0 → 100644
View file @
29a2b631
import
type
{
ComponentStyleConfig
}
from
'
@chakra-ui/theme
'
;
const
Tag
:
ComponentStyleConfig
=
{
baseStyle
:
{
container
:
{
display
:
'
inline-block
'
,
overflow
:
'
hidden
'
,
textOverflow
:
'
ellipsis
'
,
},
},
}
export
default
Tag
;
theme/components/index.ts
View file @
29a2b631
...
@@ -4,6 +4,7 @@ import Modal from './Modal';
...
@@ -4,6 +4,7 @@ import Modal from './Modal';
import
Table
from
'
./Table
'
;
import
Table
from
'
./Table
'
;
import
Form
from
'
./Form
'
;
import
Form
from
'
./Form
'
;
import
Input
from
'
./Input
'
;
import
Input
from
'
./Input
'
;
import
Tag
from
'
./Tag
'
;
const
components
=
{
const
components
=
{
Switch
,
Switch
,
...
@@ -12,6 +13,7 @@ const components = {
...
@@ -12,6 +13,7 @@ const components = {
Table
,
Table
,
Input
,
Input
,
Form
,
Form
,
Tag
,
}
}
export
default
components
;
export
default
components
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment