-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Design tweaks to swap/auction form (#1168)
* Make asset/balance selectors grow out of their buttons * Redesign BalanceValueView and add a tooltip * Tweak layout of balance/asset selectors * Use single-row layout * Reorganize swap form * Animate the swap UI more * Support motion in EduInfoCard * Support motion in InputBlock * Tighten up syntax * Support motion in Card and GradientHeader * Use motion throughout Swap page * Fix layout issues in AuctionList * Calculate estimated outputs for an auction * Refactor to use new helper * Add changeset * Undo changes to amount types * Tweak variable name * Simplify code * Fix bug with loading property * Remove unneeded loading prop * Add cmoment * review updates * Box component css tweaks --------- Co-authored-by: Gabe Rodriguez <[email protected]>
- Loading branch information
1 parent
aabe23c
commit 120b654
Showing
28 changed files
with
663 additions
and
332 deletions.
There are no files selected for viewing
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,7 @@ | ||
--- | ||
'@penumbra-zone/getters': minor | ||
'minifront': minor | ||
'@penumbra-zone/ui': minor | ||
--- | ||
|
||
Support estimates of outputs for auctions; redesign the estimate results part of the swap/auction UI |
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
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
40 changes: 40 additions & 0 deletions
40
apps/minifront/src/components/swap/swap-form/estimate-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,40 @@ | ||
import { buttonVariants } from '@penumbra-zone/ui/components/ui/button'; | ||
import { | ||
Tooltip, | ||
TooltipProvider, | ||
TooltipTrigger, | ||
TooltipContent, | ||
} from '@penumbra-zone/ui/components/ui/tooltip'; | ||
import { cn } from '@penumbra-zone/ui/lib/utils'; | ||
|
||
export const EstimateButton = ({ | ||
disabled, | ||
onClick, | ||
}: { | ||
disabled: boolean; | ||
onClick: () => void; | ||
}) => { | ||
return ( | ||
<TooltipProvider> | ||
<Tooltip> | ||
<TooltipTrigger | ||
// Style as a button | ||
className={cn('w-full', buttonVariants({ variant: 'secondary', size: 'sm' }))} | ||
onClick={e => { | ||
e.preventDefault(); | ||
onClick(); | ||
}} | ||
disabled={disabled} | ||
> | ||
Estimate | ||
</TooltipTrigger> | ||
<TooltipContent side='bottom' className='w-60'> | ||
<p> | ||
Privacy note: This makes a request to your config's gRPC node to simulate a swap of | ||
these assets. That means you are possibly revealing your intent to this node. | ||
</p> | ||
</TooltipContent> | ||
</Tooltip> | ||
</TooltipProvider> | ||
); | ||
}; |
Oops, something went wrong.