Skip to content

Commit

Permalink
fix alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
JP Angelle committed Sep 18, 2023
1 parent 63eef1d commit 2a93b37
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions centrifuge-app/src/components/PoolFilter/SortButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ export type SortButtonProps = {
label: string
searchKey: SortBy
tooltip?: string
justifySelf?: 'start' | 'end'
}

type Sorting = {
isActive: boolean
direction: string | null
}

export function SortButton({ label, searchKey, tooltip }: SortButtonProps) {
export function SortButton({ label, searchKey, tooltip, justifySelf = 'end' }: SortButtonProps) {
const history = useHistory()
const { pathname, search } = useLocation()

Expand Down Expand Up @@ -58,7 +59,7 @@ export function SortButton({ label, searchKey, tooltip }: SortButtonProps) {
: `Sort ${label} ascending`
}
aria-live
style={{ justifySelf: 'end' }}
style={{ justifySelf }}
>
<FilterButton forwardedAs="span" variant="body3">
{label}
Expand All @@ -82,7 +83,7 @@ export function SortButton({ label, searchKey, tooltip }: SortButtonProps) {
: `Sort ${label} ascending`
}
aria-live
style={{ justifySelf: 'end' }}
style={{ justifySelf }}
>
{label}

Expand Down
2 changes: 1 addition & 1 deletion centrifuge-app/src/components/PoolFilter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function PoolFilter({ pools }: PoolFilterProps) {
tooltip="Value locked represents the current total value of pool tokens."
/>

<SortButton {...poolFilterConfig.apr} />
<SortButton {...poolFilterConfig.apr} justifySelf="start" />

<FilterMenu
{...poolFilterConfig.poolStatus}
Expand Down

0 comments on commit 2a93b37

Please sign in to comment.