Skip to content

Commit

Permalink
s
Browse files Browse the repository at this point in the history
  • Loading branch information
sehyunc committed Sep 25, 2024
1 parent f139eda commit 77407df
Show file tree
Hide file tree
Showing 8 changed files with 72 additions and 77 deletions.
50 changes: 24 additions & 26 deletions app/trade/[base]/components/order-details/order-details-sheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,33 +64,31 @@ export function OrderDetailsSheet({
return (
<Dialog>
<DialogTrigger asChild>{children}</DialogTrigger>
<DialogContent className="h-dvh p-0">
<div className="">
<ScrollArea className="h-[calc(100dvh-64px)]">
<VisuallyHidden>
<DialogHeader>
<DialogTitle>Order Details</DialogTitle>
<DialogDescription>View order details</DialogDescription>
</DialogHeader>
</VisuallyHidden>
{order.fills.length ? (
<DetailsContent order={order} />
) : (
<EmptyContent order={order} />
)}
</ScrollArea>
<DialogFooter>
<DialogClose asChild>
<Button
className="border-x-0 font-extended text-lg"
size="xl"
variant="outline"
>
Close
</Button>
</DialogClose>
</DialogFooter>
<DialogContent className="h-dvh gap-0 p-0">
<VisuallyHidden>
<DialogHeader>
<DialogTitle>Order Details</DialogTitle>
<DialogDescription>View order details</DialogDescription>
</DialogHeader>
</VisuallyHidden>
<div className="overflow-y-auto">
{order.fills.length ? (
<DetailsContent order={order} />
) : (
<EmptyContent order={order} />
)}
</div>
<DialogFooter className="p-6 pt-0">
<DialogClose asChild>
<Button
className="font-extended text-lg"
size="xl"
variant="outline"
>
Close
</Button>
</DialogClose>
</DialogFooter>
</DialogContent>
</Dialog>
)
Expand Down
24 changes: 11 additions & 13 deletions components/dialogs/order-stepper/mobile/new-order-stepper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,17 @@ export function NewOrderStepperInner({
}}
>
<DialogTrigger asChild>{children}</DialogTrigger>
<DialogContent className="h-dvh p-0">
<div className="flex h-dvh flex-col">
{step === Step.DEFAULT && (
<DefaultStep
{...props}
onSubmit={handleSubmit}
/>
)}
{step === Step.CONFIRM && lockedFormValues && (
<ConfirmStep {...lockedFormValues} />
)}
{step === Step.SUCCESS && <SuccessStepWithoutSavings />}
</div>
<DialogContent className="flex h-dvh flex-col gap-0 p-0">
{step === Step.DEFAULT && (
<DefaultStep
{...props}
onSubmit={handleSubmit}
/>
)}
{step === Step.CONFIRM && lockedFormValues && (
<ConfirmStep {...lockedFormValues} />
)}
{step === Step.SUCCESS && <SuccessStepWithoutSavings />}
</DialogContent>
</Dialog>
)
Expand Down
6 changes: 3 additions & 3 deletions components/dialogs/order-stepper/mobile/steps/confirm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ export function ConfirmStep(props: NewOrderConfirmationProps) {
<DialogHeader className="p-6 text-left">
<DialogTitle className="font-extended">Review Order</DialogTitle>
</DialogHeader>
<div className="space-y-6 overflow-y-auto p-6">
<div className="space-y-6 overflow-y-auto px-6">
<ConfirmOrderDisplay {...props} />
</div>
<DialogFooter className="mt-auto flex-row">
<DialogFooter className="mt-auto flex-row p-6 pt-0">
<DialogClose asChild>
<Button
className="flex-1 border-x-0 font-extended text-lg"
className="flex-1 font-extended text-lg"
size="xl"
variant="outline"
>
Expand Down
4 changes: 2 additions & 2 deletions components/dialogs/order-stepper/mobile/steps/default.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ export function DefaultStep(props: {
<div className="overflow-y-auto py-6">
<NewOrderForm {...props} />
</div>
<DialogFooter className="mt-auto">
<DialogFooter className="mt-auto p-6 pt-0">
<DialogClose asChild>
<Button
className="border-x-0 font-extended text-lg"
className="font-extended text-lg"
size="xl"
variant="outline"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,17 @@ export function SuccessStepWithoutSavings() {
<DialogDescription>Your order has been placed.</DialogDescription>
</VisuallyHidden>
</DialogHeader>
<div className="space-y-6 overflow-y-auto p-6 pb-0">
<div className="space-y-6 overflow-y-auto px-6">
<OrderStatusDisplay
currentStatus={orderStatus}
states={states}
/>
<DidYouKnowContent />
</div>
<DialogFooter className="mt-auto">
<DialogFooter className="mt-auto p-6 pt-0">
<DialogClose asChild>
<Button
className="border-x-0 font-extended text-lg"
className="font-extended text-lg"
size="xl"
variant="outline"
>
Expand Down
48 changes: 24 additions & 24 deletions components/dialogs/sign-in-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,29 +182,29 @@ export function SignInDialog({
open={open}
onOpenChange={onOpenChange}
>
<DialogContent className="h-dvh p-0">
<div className="flex flex-col">
<DialogHeader className="p-6 text-left">
<DialogTitle>Unlock your Wallet</DialogTitle>
<DialogDescription>
To trade on Renegade, we require a one-time signature to create or
find your wallet on-chain.
</DialogDescription>
</DialogHeader>
<SignInContent />
<DialogFooter className="mt-auto">
<Button
className="font-extended text-lg"
disabled={isConnecting || signStatus === "pending"}
size="xl"
onClick={handleClick}
>
{signStatus === "pending" || isConnecting
? "Confirm in wallet"
: "Sign in to Renegade"}
</Button>
</DialogFooter>
</div>
<DialogContent className="h-dvh gap-0">
<DialogHeader className="text-left">
<DialogTitle>Unlock your Wallet</DialogTitle>
<DialogDescription>
To trade on Renegade, we require a one-time signature to create or
find your wallet on-chain.
</DialogDescription>
</DialogHeader>
<DialogFooter>
<Button
className="font-extended text-lg"
disabled={isConnecting || signStatus === "pending"}
size="xl"
onClick={handleClick}
>
{signStatus === "pending" || isConnecting
? "Confirm in wallet"
: "Sign in to Renegade"}
</Button>
<div className="mb-6">
<SignInContent />
</div>
</DialogFooter>
</DialogContent>
</Dialog>
)
Expand All @@ -220,7 +220,7 @@ function SignInContent() {
)
return (
<>
<div className="flex items-center space-x-2 px-6 pb-6">
<div className="flex items-center space-x-2">
<Checkbox
checked={rememberMe}
id="remember-me"
Expand Down
6 changes: 3 additions & 3 deletions components/dialogs/token-select-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export function TokenSelectDialog({
>
<DialogTrigger asChild>{children}</DialogTrigger>
<DialogContent
className="h-dvh p-0"
className="h-dvh gap-0 p-0"
onOpenAutoFocus={(e) => {
e.preventDefault()
}}
Expand All @@ -101,10 +101,10 @@ export function TokenSelectDialog({
onClose={() => setOpen(false)}
/>
</ScrollArea>
<DialogFooter>
<DialogFooter className="p-6 pt-0">
<DialogClose asChild>
<Button
className="border-x-0 font-extended text-lg"
className="font-extended text-lg"
size="xl"
variant="outline"
>
Expand Down
5 changes: 2 additions & 3 deletions components/dialogs/transfer/transfer-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ function TransferForm({
</ResponsiveTooltip>
</DialogFooter>
) : (
<DialogFooter className="mt-auto flex-row">
<DialogFooter className="mt-auto flex-row p-6">
<DialogClose asChild>
<Button
className="flex-1 font-extended text-lg"
Expand All @@ -606,7 +606,7 @@ function TransferForm({
<ResponsiveTooltip>
<ResponsiveTooltipTrigger className="flex-1">
<Button
className="w-full border-l-0 font-extended text-lg"
className="w-full !border-l-0 font-extended text-lg"
disabled={
!form.formState.isValid ||
(direction === ExternalTransferDirection.Deposit &&
Expand All @@ -617,7 +617,6 @@ function TransferForm({
maintenanceMode.severity === "critical")
}
size="xl"
variant="outline"
>
{buttonText}
</Button>
Expand Down

0 comments on commit 77407df

Please sign in to comment.