moved cards to drawers for mobile view

This commit is contained in:
lemonknowsall committed 2025-10-16 23:32:07 -07:00
1 parent 56bdebff5d
commit 8ef018df8a
4 files changed
+173 -84

No files matched your search

+28 -18
View File
@@ -1,6 +1,5 @@
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
import { Download, Zap } from 'lucide-react';
interface ReceiveCardProps {
@@ -25,20 +24,19 @@ export function ReceiveCard({
isLoading,
}: ReceiveCardProps) {
return (
<Card className="border-0 shadow-none bg-muted/30">
<CardHeader>
<CardTitle className="flex items-center">
<Download className="h-5 w-5 mr-2" />
Receive
</CardTitle>
<CardDescription className="min-h-[2.5rem] flex items-center">
<div className="space-y-6">
{/* Description */}
<div className="text-center">
<p className="text-muted-foreground">
{mode === 'tokens'
? 'Enter Cashu token to redeem'
: 'Deposit funds with Lightning'
}
</CardDescription>
</CardHeader>
<CardContent className="space-y-4">
</p>
</div>
{/* Content */}
<div className="space-y-4">
{mode === 'tokens' ? (
<>
{!activeMintUrl && (
@@ -46,7 +44,7 @@ export function ReceiveCard({
Select a mint to receive tokens
</div>
)}
<div className="flex gap-2">
<div className="space-y-3">
<Input
placeholder="cashuBo2Ft..."
value={tokenInput}
@@ -56,10 +54,16 @@ export function ReceiveCard({
onReceive();
}
}}
className="flex-1"
className="w-full"
disabled={!activeMintUrl}
autoFocus
/>
<Button onClick={onReceive} disabled={!tokenInput.trim() || !activeMintUrl || isLoading}>
<Button
onClick={onReceive}
disabled={!tokenInput.trim() || !activeMintUrl || isLoading}
className="w-full"
size="lg"
>
<Download className="h-4 w-4 mr-2" />
Receive
</Button>
@@ -72,7 +76,7 @@ export function ReceiveCard({
Select a mint to create Lightning invoice
</div>
)}
<div className="flex gap-2">
<div className="space-y-3">
<Input
placeholder="Amount (sats)"
type="number"
@@ -84,15 +88,21 @@ export function ReceiveCard({
}
}}
disabled={!activeMintUrl}
autoFocus
/>
<Button onClick={onReceive} disabled={!quoteAmount || !activeMintUrl || isLoading}>
<Button
onClick={onReceive}
disabled={!quoteAmount || !activeMintUrl || isLoading}
className="w-full"
size="lg"
>
<Zap className="h-4 w-4 mr-2" />
Quote
</Button>
</div>
</>
)}
</CardContent>
</Card>
</div>
</div>
);
}