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
7914ba1b
Commit
7914ba1b
authored
Mar 31, 2025
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
yet another tab styles update
parent
c9dd38ec
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
41 additions
and
42 deletions
+41
-42
tabs.tsx
toolkit/chakra/tabs.tsx
+0
-1
AdaptiveTabsList.tsx
toolkit/components/AdaptiveTabs/AdaptiveTabsList.tsx
+10
-11
AdaptiveTabsMenu.tsx
toolkit/components/AdaptiveTabs/AdaptiveTabsMenu.tsx
+27
-21
tabs.recipe.ts
toolkit/theme/recipes/tabs.recipe.ts
+2
-1
AddressContract.tsx
ui/address/AddressContract.tsx
+1
-5
AddressTokens.tsx
ui/address/AddressTokens.tsx
+0
-2
Address.tsx
ui/pages/Address.tsx
+1
-1
No files found.
toolkit/chakra/tabs.tsx
View file @
7914ba1b
...
@@ -36,7 +36,6 @@ export const TabsCounter = ({ count }: TabsCounterProps) => {
...
@@ -36,7 +36,6 @@ export const TabsCounter = ({ count }: TabsCounterProps) => {
return
(
return
(
<
chakra
.
span
<
chakra
.
span
color=
{
count
>
0
?
'
text.secondary
'
:
{
_light
:
'
blackAlpha.400
'
,
_dark
:
'
whiteAlpha.400
'
}
}
color=
{
count
>
0
?
'
text.secondary
'
:
{
_light
:
'
blackAlpha.400
'
,
_dark
:
'
whiteAlpha.400
'
}
}
ml=
{
1
}
_groupHover=
{
{
_groupHover=
{
{
color
:
'
inherit
'
,
color
:
'
inherit
'
,
}
}
}
}
...
...
toolkit/components/AdaptiveTabs/AdaptiveTabsList.tsx
View file @
7914ba1b
...
@@ -155,19 +155,18 @@ const AdaptiveTabsList = (props: Props) => {
...
@@ -155,19 +155,18 @@ const AdaptiveTabsList = (props: Props) => {
}
}
return
(
return
(
<
Skeleton
loading=
{
isLoading
}
key=
{
value
}
asChild
>
<
TabsTrigger
<
TabsTrigger
key=
{
value
}
value=
{
value
}
value=
{
value
}
ref=
{
ref
}
ref=
{
ref
}
scrollSnapAlign=
"start"
scrollSnapAlign=
"start"
flexShrink=
{
0
}
flexShrink=
{
0
}
{
...
getItemStyles
(
index
,
tabsCut
)
}
{
...
getItemStyles
(
index
,
tabsCut
)
}
>
>
<
Skeleton
loading=
{
isLoading
}
>
{
typeof
tab
.
title
===
'
function
'
?
tab
.
title
()
:
tab
.
title
}
{
typeof
tab
.
title
===
'
function
'
?
tab
.
title
()
:
tab
.
title
}
<
TabsCounter
count=
{
tab
.
count
}
/>
<
TabsCounter
count=
{
tab
.
count
}
/>
</
Skeleton
>
</
TabsTrigger
>
</
TabsTrigger
>
</
Skeleton
>
);
);
})
}
})
}
{
{
...
...
toolkit/components/AdaptiveTabs/AdaptiveTabsMenu.tsx
View file @
7914ba1b
...
@@ -2,14 +2,15 @@ import React from 'react';
...
@@ -2,14 +2,15 @@ import React from 'react';
import
type
{
TabItem
}
from
'
./types
'
;
import
type
{
TabItem
}
from
'
./types
'
;
import
type
{
ButtonProps
}
from
'
toolkit/chakra/button
'
;
import
{
PopoverBody
,
PopoverCloseTriggerWrapper
,
PopoverContent
,
PopoverRoot
,
PopoverTrigger
}
from
'
toolkit/chakra/popover
'
;
import
{
Button
}
from
'
toolkit/chakra/button
'
;
import
{
PopoverBody
,
PopoverContent
,
PopoverRoot
,
PopoverTrigger
}
from
'
toolkit/chakra/popover
'
;
import
{
TabsCounter
,
TabsTrigger
}
from
'
toolkit/chakra/tabs
'
;
import
{
TabsCounter
,
TabsTrigger
}
from
'
toolkit/chakra/tabs
'
;
import
IconSvg
from
'
ui/shared/IconSvg
'
;
import
{
getTabValue
,
menuButton
}
from
'
./utils
'
;
import
{
IconButton
}
from
'
../../chakra/icon-button
'
;
import
type
{
IconButtonProps
}
from
'
../../chakra/icon-button
'
;
import
{
getTabValue
}
from
'
./utils
'
;
interface
Props
extends
ButtonProps
{
interface
Props
extends
Icon
ButtonProps
{
tabs
:
Array
<
TabItem
>
;
tabs
:
Array
<
TabItem
>
;
tabsCut
:
number
;
tabsCut
:
number
;
isActive
:
boolean
;
isActive
:
boolean
;
...
@@ -20,7 +21,7 @@ const AdaptiveTabsMenu = ({ tabs, tabsCut, isActive, ...props }: Props, ref: Rea
...
@@ -20,7 +21,7 @@ const AdaptiveTabsMenu = ({ tabs, tabsCut, isActive, ...props }: Props, ref: Rea
return
(
return
(
<
PopoverRoot
positioning=
{
{
placement
:
'
bottom-end
'
}
}
>
<
PopoverRoot
positioning=
{
{
placement
:
'
bottom-end
'
}
}
>
<
PopoverTrigger
>
<
PopoverTrigger
>
<
Button
<
Icon
Button
// we use "div" so the :last-of-type pseudo-class targets the last tab and not the menu trigger
// we use "div" so the :last-of-type pseudo-class targets the last tab and not the menu trigger
as=
"div"
as=
"div"
variant=
"plain"
variant=
"plain"
...
@@ -34,10 +35,11 @@ const AdaptiveTabsMenu = ({ tabs, tabsCut, isActive, ...props }: Props, ref: Rea
...
@@ -34,10 +35,11 @@ const AdaptiveTabsMenu = ({ tabs, tabsCut, isActive, ...props }: Props, ref: Rea
}
}
}
}
ref=
{
ref
}
ref=
{
ref
}
expanded=
{
isActive
}
expanded=
{
isActive
}
px=
"18px"
{
...
props
}
{
...
props
}
>
>
{
menuButton
.
title
}
<
IconSvg
name=
"dots"
boxSize=
{
5
}
/>
</
Button
>
</
Icon
Button
>
</
PopoverTrigger
>
</
PopoverTrigger
>
<
PopoverContent
>
<
PopoverContent
>
<
PopoverBody
display=
"flex"
flexDir=
"column"
rowGap=
{
2
}
px=
{
0
}
>
<
PopoverBody
display=
"flex"
flexDir=
"column"
rowGap=
{
2
}
px=
{
0
}
>
...
@@ -45,12 +47,15 @@ const AdaptiveTabsMenu = ({ tabs, tabsCut, isActive, ...props }: Props, ref: Rea
...
@@ -45,12 +47,15 @@ const AdaptiveTabsMenu = ({ tabs, tabsCut, isActive, ...props }: Props, ref: Rea
const
value
=
getTabValue
(
tab
);
const
value
=
getTabValue
(
tab
);
return
(
return
(
<
PopoverCloseTriggerWrapper
key=
{
value
}
>
<
TabsTrigger
<
TabsTrigger
key=
{
value
}
className=
"group"
value=
{
value
}
value=
{
value
}
w=
"100%"
w=
"100%"
py=
"5px"
py=
"5px"
borderRadius=
"none"
borderRadius=
"none"
fontWeight=
"normal"
color=
"initial"
_hover=
{
{
_hover=
{
{
bg
:
'
tabs.solid.bg.selected
'
,
bg
:
'
tabs.solid.bg.selected
'
,
}
}
}
}
...
@@ -58,6 +63,7 @@ const AdaptiveTabsMenu = ({ tabs, tabsCut, isActive, ...props }: Props, ref: Rea
...
@@ -58,6 +63,7 @@ const AdaptiveTabsMenu = ({ tabs, tabsCut, isActive, ...props }: Props, ref: Rea
{
typeof
tab
.
title
===
'
function
'
?
tab
.
title
()
:
tab
.
title
}
{
typeof
tab
.
title
===
'
function
'
?
tab
.
title
()
:
tab
.
title
}
<
TabsCounter
count=
{
tab
.
count
}
/>
<
TabsCounter
count=
{
tab
.
count
}
/>
</
TabsTrigger
>
</
TabsTrigger
>
</
PopoverCloseTriggerWrapper
>
);
);
})
}
})
}
</
PopoverBody
>
</
PopoverBody
>
...
...
toolkit/theme/recipes/tabs.recipe.ts
View file @
7914ba1b
...
@@ -130,6 +130,7 @@ export const recipe = defineSlotRecipe({
...
@@ -130,6 +130,7 @@ export const recipe = defineSlotRecipe({
solid
:
{
solid
:
{
trigger
:
{
trigger
:
{
fontWeight
:
'
600
'
,
fontWeight
:
'
600
'
,
gap
:
'
1
'
,
borderRadius
:
'
base
'
,
borderRadius
:
'
base
'
,
color
:
'
tabs.solid.fg
'
,
color
:
'
tabs.solid.fg
'
,
bg
:
'
transparent
'
,
bg
:
'
transparent
'
,
...
@@ -148,7 +149,7 @@ export const recipe = defineSlotRecipe({
...
@@ -148,7 +149,7 @@ export const recipe = defineSlotRecipe({
secondary
:
{
secondary
:
{
list
:
{
list
:
{
border
:
'
none
'
,
border
:
'
none
'
,
columnGap
:
'
3
'
,
columnGap
:
'
2
'
,
_horizontal
:
{
_horizontal
:
{
_before
:
{
_before
:
{
display
:
'
none
'
,
display
:
'
none
'
,
...
...
ui/address/AddressContract.tsx
View file @
7914ba1b
...
@@ -10,17 +10,13 @@ interface Props {
...
@@ -10,17 +10,13 @@ interface Props {
shouldRender
?:
boolean
;
shouldRender
?:
boolean
;
}
}
const
TAB_LIST_PROPS
=
{
columnGap
:
3
,
};
const
AddressContract
=
({
tabs
,
isLoading
,
shouldRender
}:
Props
)
=>
{
const
AddressContract
=
({
tabs
,
isLoading
,
shouldRender
}:
Props
)
=>
{
if
(
!
shouldRender
)
{
if
(
!
shouldRender
)
{
return
null
;
return
null
;
}
}
return
(
return
(
<
RoutedTabs
tabs=
{
tabs
}
variant=
"secondary"
size=
"sm"
listProps=
{
TAB_LIST_PROPS
}
isLoading=
{
isLoading
}
/>
<
RoutedTabs
tabs=
{
tabs
}
variant=
"secondary"
size=
"sm"
isLoading=
{
isLoading
}
/>
);
);
};
};
...
...
ui/address/AddressTokens.tsx
View file @
7914ba1b
...
@@ -34,12 +34,10 @@ const TAB_LIST_PROPS = {
...
@@ -34,12 +34,10 @@ const TAB_LIST_PROPS = {
mt
:
1
,
mt
:
1
,
mb
:
{
base
:
6
,
lg
:
1
},
mb
:
{
base
:
6
,
lg
:
1
},
py
:
5
,
py
:
5
,
columnGap
:
3
,
};
};
const
TAB_LIST_PROPS_MOBILE
=
{
const
TAB_LIST_PROPS_MOBILE
=
{
my
:
8
,
my
:
8
,
columnGap
:
3
,
};
};
const
getTokenFilterValue
=
(
getFilterValuesFromQuery
<
NFTTokenType
>
).
bind
(
null
,
NFT_TOKEN_TYPE_IDS
);
const
getTokenFilterValue
=
(
getFilterValuesFromQuery
<
NFTTokenType
>
).
bind
(
null
,
NFT_TOKEN_TYPE_IDS
);
...
...
ui/pages/Address.tsx
View file @
7914ba1b
...
@@ -166,7 +166,7 @@ const AddressPageContent = () => {
...
@@ -166,7 +166,7 @@ const AddressPageContent = () => {
return (
return (
<>
<>
<span>{ tabName }</span>
<span>{ tabName }</span>
<IconSvg name="status/success" boxSize="14px" color="green.500"
ml={ 1 }
/>
<IconSvg name="status/success" boxSize="14px" color="green.500"/>
</>
</>
);
);
}
}
...
...
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