Skip to content

Commit

Permalink
Move staked and debonding count badge into text parentheses
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaw3d committed Jul 18, 2024
1 parent 7ef199f commit da7e7b6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
1 change: 1 addition & 0 deletions .changelog/2014.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Move staked and debonding count badge into text parentheses
15 changes: 10 additions & 5 deletions src/app/pages/AccountPage/Features/StakeSubnavigation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import styled from 'styled-components'
import { normalizeColor } from 'grommet/es6/utils'

import { AccountPageParams } from '../../validateAccountPageRoute'
import { Button } from 'grommet/es6/components/Button'

const StyledNavItem = styled(NavLink)`
letter-spacing: 0;
padding: ${({ theme }) => theme.global?.edgeSize?.small};
:hover {
Expand All @@ -23,7 +23,8 @@ const StyledNavItem = styled(NavLink)`
}
@media only screen and (max-width: ${({ theme }) => `${theme.global?.breakpoints?.small?.value}px`}) {
padding: ${({ theme }) => theme.global?.edgeSize?.xsmall};
padding-top: ${({ theme }) => theme.global?.edgeSize?.xsmall};
padding-bottom: ${({ theme }) => theme.global?.edgeSize?.xsmall};
}
`

Expand All @@ -36,9 +37,13 @@ interface NavItemProps {
const NavItem = ({ counter, label, route }: NavItemProps) => {
return (
<StyledNavItem end to={route}>
<Button badge={counter} tabIndex={-1}>
{label}
</Button>
{counter ? (
<span>
{label} ({counter})
</span>
) : (
<span>{label}</span>
)}
</StyledNavItem>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,10 +405,6 @@ exports[`<ActiveDelegationList /> should match snapshot 1`] = `
}
@media only screen and (max-width:768px) {
}
@media screen and (max-width:599px) {
.c13 {
display: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -425,10 +425,6 @@ exports[`<DebondingDelegationList /> should match snapshot 1`] = `
}
@media only screen and (max-width:768px) {
}
<section
class="c0"
data-testid="debonding-delegations"
Expand Down

0 comments on commit da7e7b6

Please sign in to comment.