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
c5e5d90a
Commit
c5e5d90a
authored
Jan 26, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix "button in button"
parent
f55f8a6c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
AddressTxsFilter.tsx
ui/address/AddressTxsFilter.tsx
+1
-0
FilterButton.tsx
ui/shared/filters/FilterButton.tsx
+4
-1
No files found.
ui/address/AddressTxsFilter.tsx
View file @
c5e5d90a
...
@@ -27,6 +27,7 @@ const AddressTxsFilter = ({ onFilterChange, defaultFilter, isActive }: Props) =>
...
@@ -27,6 +27,7 @@ const AddressTxsFilter = ({ onFilterChange, defaultFilter, isActive }: Props) =>
<
FilterButton
<
FilterButton
isActive=
{
isOpen
||
isActive
}
isActive=
{
isOpen
||
isActive
}
onClick=
{
onToggle
}
onClick=
{
onToggle
}
as=
"div"
/>
/>
</
MenuButton
>
</
MenuButton
>
<
MenuList
zIndex=
{
2
}
>
<
MenuList
zIndex=
{
2
}
>
...
...
ui/shared/filters/FilterButton.tsx
View file @
c5e5d90a
import
type
{
As
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Button
,
Circle
,
Icon
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Button
,
Circle
,
Icon
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
...
@@ -9,9 +10,10 @@ interface Props {
...
@@ -9,9 +10,10 @@ interface Props {
isActive
?:
boolean
;
isActive
?:
boolean
;
appliedFiltersNum
?:
number
;
appliedFiltersNum
?:
number
;
onClick
:
()
=>
void
;
onClick
:
()
=>
void
;
as
?:
As
;
}
}
const
FilterButton
=
({
isActive
,
appliedFiltersNum
,
onClick
}:
Props
,
ref
:
React
.
ForwardedRef
<
HTMLButtonElement
>
)
=>
{
const
FilterButton
=
({
isActive
,
appliedFiltersNum
,
onClick
,
as
}:
Props
,
ref
:
React
.
ForwardedRef
<
HTMLButtonElement
>
)
=>
{
const
badgeColor
=
useColorModeValue
(
'
white
'
,
'
black
'
);
const
badgeColor
=
useColorModeValue
(
'
white
'
,
'
black
'
);
const
badgeBgColor
=
useColorModeValue
(
'
blue.700
'
,
'
gray.50
'
);
const
badgeBgColor
=
useColorModeValue
(
'
blue.700
'
,
'
gray.50
'
);
...
@@ -27,6 +29,7 @@ const FilterButton = ({ isActive, appliedFiltersNum, onClick }: Props, ref: Reac
...
@@ -27,6 +29,7 @@ const FilterButton = ({ isActive, appliedFiltersNum, onClick }: Props, ref: Reac
isActive=
{
isActive
}
isActive=
{
isActive
}
px=
{
1.5
}
px=
{
1.5
}
flexShrink=
{
0
}
flexShrink=
{
0
}
as=
{
as
}
>
>
{
FilterIcon
}
{
FilterIcon
}
<
Box
display=
{
{
base
:
'
none
'
,
lg
:
'
block
'
}
}
>
Filter
</
Box
>
<
Box
display=
{
{
base
:
'
none
'
,
lg
:
'
block
'
}
}
>
Filter
</
Box
>
...
...
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