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
9848fdaf
Commit
9848fdaf
authored
Aug 13, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
styling link item
parent
67dab610
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
62 additions
and
8 deletions
+62
-8
check.svg
icons/check.svg
+3
-0
Popover.ts
theme/components/Popover.ts
+1
-1
NavLink.tsx
ui/navigation/NavLink.tsx
+0
-1
NetworkMenuLink.tsx
ui/navigation/networkMenu/NetworkMenuLink.tsx
+49
-3
NetworkMenuPopup.tsx
ui/navigation/networkMenu/NetworkMenuPopup.tsx
+5
-3
useColors.ts
ui/navigation/useColors.ts
+4
-0
No files found.
icons/check.svg
0 → 100644
View file @
9848fdaf
<svg
width=
"24"
height=
"24"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
d=
"M9.293 14.465a1 1 0 0 0 1.414 0l7.778-7.78A1 1 0 0 1 19.899 8.1l-9.192 9.193a1 1 0 0 1-1.414 0l-4.95-4.95a1 1 0 0 1 1.414-1.414l3.536 3.536Z"
fill=
"currentColor"
/>
</svg>
\ No newline at end of file
theme/components/Popover.ts
View file @
9848fdaf
...
@@ -12,7 +12,7 @@ const baseStylePopper: SystemStyleObject = {
...
@@ -12,7 +12,7 @@ const baseStylePopper: SystemStyleObject = {
};
};
const
baseStyleContent
:
SystemStyleFunction
=
(
props
)
=>
{
const
baseStyleContent
:
SystemStyleFunction
=
(
props
)
=>
{
const
bg
=
mode
(
'
white
'
,
'
gray.
7
00
'
)(
props
);
const
bg
=
mode
(
'
white
'
,
'
gray.
9
00
'
)(
props
);
const
shadowColor
=
mode
(
'
gray.200
'
,
'
whiteAlpha.300
'
)(
props
);
const
shadowColor
=
mode
(
'
gray.200
'
,
'
whiteAlpha.300
'
)(
props
);
return
{
return
{
...
...
ui/navigation/NavLink.tsx
View file @
9848fdaf
...
@@ -22,7 +22,6 @@ const NavLink = ({ text, pathname, icon, isCollapsed }: Props) => {
...
@@ -22,7 +22,6 @@ const NavLink = ({ text, pathname, icon, isCollapsed }: Props) => {
return
(
return
(
<
NextLink
href=
{
pathname
}
passHref
>
<
NextLink
href=
{
pathname
}
passHref
>
<
Link
<
Link
as=
"li"
as=
"li"
listStyleType=
"none"
listStyleType=
"none"
...
...
ui/navigation/networkMenu/NetworkMenuLink.tsx
View file @
9848fdaf
import
{
Box
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Flex
,
Icon
,
Text
}
from
'
@chakra-ui/react
'
;
import
NextLink
from
'
next/link
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
NetworkLink
}
from
'
./types
'
;
import
type
{
NetworkLink
}
from
'
./types
'
;
import
checkIcon
from
'
icons/check.svg
'
;
import
useColors
from
'
../useColors
'
;
type
Props
=
NetworkLink
;
type
Props
=
NetworkLink
;
const
NetworkMenuLink
=
({
name
}:
Props
)
=>
{
const
NetworkMenuLink
=
({
name
,
url
,
icon
}:
Props
)
=>
{
return
<
Box
>
{
name
}
</
Box
>;
const
isActive
=
name
===
'
Gnosis Chain
'
;
const
colors
=
useColors
();
return
(
<
Box
as=
"li"
listStyleType=
"none"
>
<
NextLink
href=
{
url
}
passHref
>
<
Flex
as=
"a"
px=
{
4
}
py=
{
2
}
alignItems=
"center"
cursor=
"pointer"
borderWidth=
"1px"
borderColor=
{
isActive
?
colors
.
border
.
active
:
colors
.
border
.
default
}
borderRadius=
"base"
color=
{
isActive
?
colors
.
text
.
active
:
colors
.
text
.
default
}
bgColor=
{
isActive
?
colors
.
bg
.
active
:
colors
.
bg
.
default
}
_hover=
{
{
color
:
isActive
?
colors
.
text
.
active
:
colors
.
text
.
hover
}
}
>
<
Icon
as=
{
icon
}
boxSize=
"40px"
color=
"deeppink"
/>
<
Text
marginLeft=
{
3
}
fontWeight=
"500"
color=
"inherit"
>
{
name
}
</
Text
>
{
isActive
&&
(
<
Icon
as=
{
checkIcon
}
boxSize=
"24px"
marginLeft=
"auto"
/>
)
}
</
Flex
>
</
NextLink
>
</
Box
>
);
};
};
export
default
React
.
memo
(
NetworkMenuLink
);
export
default
React
.
memo
(
NetworkMenuLink
);
ui/navigation/networkMenu/NetworkMenuPopup.tsx
View file @
9848fdaf
import
{
PopoverContent
,
PopoverBody
,
Text
,
Tabs
,
TabList
,
TabPanels
,
TabPanel
,
Tab
}
from
'
@chakra-ui/react
'
;
import
{
PopoverContent
,
PopoverBody
,
Text
,
Tabs
,
TabList
,
TabPanels
,
TabPanel
,
Tab
,
VStack
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
NetworkLink
}
from
'
./types
'
;
import
type
{
NetworkLink
}
from
'
./types
'
;
...
@@ -42,8 +42,10 @@ const NetworkMenuPopup = () => {
...
@@ -42,8 +42,10 @@ const NetworkMenuPopup = () => {
</
TabList
>
</
TabList
>
<
TabPanels
>
<
TabPanels
>
{
TABS
.
map
((
tab
)
=>
(
{
TABS
.
map
((
tab
)
=>
(
<
TabPanel
key=
{
tab
}
>
<
TabPanel
key=
{
tab
}
p=
{
0
}
>
{
LINKS
[
tab
].
map
((
link
)
=>
<
NetworkMenuLink
key=
{
link
.
name
}
{
...
link
}
/>)
}
<
VStack
as=
"ul"
spacing=
{
2
}
alignItems=
"stretch"
mt=
{
4
}
>
{
LINKS
[
tab
].
map
((
link
)
=>
<
NetworkMenuLink
key=
{
link
.
name
}
{
...
link
}
/>)
}
</
VStack
>
</
TabPanel
>
</
TabPanel
>
))
}
))
}
</
TabPanels
>
</
TabPanels
>
...
...
ui/navigation/useColors.ts
View file @
9848fdaf
...
@@ -11,5 +11,9 @@ export default function useColors() {
...
@@ -11,5 +11,9 @@ export default function useColors() {
'
default
'
:
'
transparent
'
,
'
default
'
:
'
transparent
'
,
active
:
useColorModeValue
(
'
blue.50
'
,
'
gray.800
'
),
active
:
useColorModeValue
(
'
blue.50
'
,
'
gray.800
'
),
},
},
border
:
{
'
default
'
:
useColorModeValue
(
'
gray.200
'
,
'
whiteAlpha.200
'
),
active
:
useColorModeValue
(
'
blue.50
'
,
'
gray.800
'
),
},
};
};
}
}
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