feat: 增加 shadcn 样式

This commit is contained in:
hzm
2026-03-06 22:34:10 +08:00
parent 1f9a4ff97a
commit 792986dd79
11 changed files with 6357 additions and 33 deletions

View File

@@ -1,5 +1,6 @@
'use client';
import { InputOTP, InputOTPGroup, InputOTPSlot } from '@/components/ui/input-otp';
import { MailIcon } from './Icons';
export default function LoginModal({
@@ -56,15 +57,21 @@ export default function LoginModal({
<div className="muted" style={{ marginBottom: 8, fontSize: '0.8rem' }}>
请输入邮箱验证码以完成注册/登录
</div>
<input
className="input"
type="text"
placeholder="输入验证码"
value={loginOtp}
onChange={(e) => setLoginOtp(e.target.value)}
disabled={loginLoading}
<InputOTP
maxLength={6}
/>
value={loginOtp}
onChange={(value) => setLoginOtp(value)}
disabled={loginLoading}
>
<InputOTPGroup>
<InputOTPSlot index={0} />
<InputOTPSlot index={1} />
<InputOTPSlot index={2} />
<InputOTPSlot index={3} />
<InputOTPSlot index={4} />
<InputOTPSlot index={5} />
</InputOTPGroup>
</InputOTP>
</div>
)}
{loginError && (

View File

@@ -3,6 +3,13 @@
import { useState } from 'react';
import { motion } from 'framer-motion';
import { CloseIcon } from './Icons';
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from '@/components/ui/select';
export default function ScanImportConfirmModal({
scannedFunds,
@@ -121,18 +128,18 @@ export default function ScanImportConfirmModal({
</div>
<div style={{ marginTop: 12, display: 'flex', alignItems: 'center', gap: 8 }}>
<span className="muted" style={{ fontSize: 13, whiteSpace: 'nowrap' }}>添加到分组</span>
<select
className="select"
value={selectedGroupId}
onChange={(e) => setSelectedGroupId(e.target.value)}
style={{ flex: 1 }}
>
<option value="all">全部</option>
<option value="fav">自选</option>
{groups.filter(g => g.id !== 'all' && g.id !== 'fav').map(g => (
<option key={g.id} value={g.id}>{g.name}</option>
))}
</select>
<Select value={selectedGroupId} onValueChange={(value) => setSelectedGroupId(value)}>
<SelectTrigger className="flex-1">
<SelectValue placeholder="选择分组" />
</SelectTrigger>
<SelectContent>
<SelectItem value="all">全部</SelectItem>
<SelectItem value="fav">自选</SelectItem>
{groups.filter(g => g.id !== 'all' && g.id !== 'fav').map(g => (
<SelectItem key={g.id} value={g.id}>{g.name}</SelectItem>
))}
</SelectContent>
</Select>
</div>
</>
)}