-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: swap console logs, closes #4438
- Loading branch information
1 parent
dc209c2
commit e8fa72f
Showing
5 changed files
with
51 additions
and
27 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
src/app/pages/swap/components/select-asset-trigger-button.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { useField } from 'formik'; | ||
import { HStack, styled } from 'leather-styles/jsx'; | ||
|
||
import { LeatherButton } from '@app/components/button/button'; | ||
import { ChevronDownIcon } from '@app/components/icons/chevron-down-icon'; | ||
|
||
interface SelectAssetTriggerButtonProps { | ||
icon?: string; | ||
name: string; | ||
onChooseAsset(): void; | ||
symbol: string; | ||
} | ||
export function SelectAssetTriggerButton({ | ||
icon, | ||
name, | ||
onChooseAsset, | ||
symbol, | ||
}: SelectAssetTriggerButtonProps) { | ||
const [field] = useField(name); | ||
|
||
return ( | ||
<LeatherButton onClick={onChooseAsset} p="space.02" variant="ghost" {...field}> | ||
<HStack> | ||
{icon && <styled.img src={icon} width="32px" height="32px" alt="Swap asset" />} | ||
<styled.span textStyle="label.01">{symbol}</styled.span> | ||
<ChevronDownIcon /> | ||
</HStack> | ||
</LeatherButton> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters