Files
users/app/scenarios/new/steps/BasicSettings.tsx
v0 2408d50cb0 refactor: overhaul UI for streamlined user experience
Redesign navigation, home overview, user portrait, and valuation pages
with improved functionality and responsive design.

Co-authored-by: null <4804959+fnvtk@users.noreply.github.com>
2025-07-18 13:47:12 +00:00

80 lines
2.7 KiB
TypeScript

"use client"
import type React from "react"
import { useState } from "react"
import { Button } from "@/components/ui/button"
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@/components/ui/card"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"
import { Textarea } from "@/components/ui/textarea"
export function BasicSettings({ onNext }: { onNext: () => void }) {
const [name, setName] = useState("")
const [description, setDescription] = useState("")
const [category, setCategory] = useState("")
const handleSubmit = (e: React.FormEvent) => {
e.preventDefault()
// 保存基本设置数据的逻辑
onNext()
}
return (
<Card>
<CardHeader>
<CardTitle></CardTitle>
<CardDescription></CardDescription>
</CardHeader>
<form onSubmit={handleSubmit}>
<CardContent className="space-y-4">
<div className="space-y-2">
<Label htmlFor="name"></Label>
<Input
id="name"
value={name}
onChange={(e) => setName(e.target.value)}
placeholder="请输入场景名称"
required
/>
</div>
<div className="space-y-2">
<Label htmlFor="category"></Label>
<Select value={category} onValueChange={setCategory} required>
<SelectTrigger id="category">
<SelectValue placeholder="选择场景类别" />
</SelectTrigger>
<SelectContent>
<SelectItem value="marketing"></SelectItem>
<SelectItem value="service"></SelectItem>
<SelectItem value="operation"></SelectItem>
<SelectItem value="sales"></SelectItem>
<SelectItem value="other"></SelectItem>
</SelectContent>
</Select>
</div>
<div className="space-y-2">
<Label htmlFor="description"></Label>
<Textarea
id="description"
value={description}
onChange={(e) => setDescription(e.target.value)}
placeholder="请输入场景描述"
rows={4}
/>
</div>
</CardContent>
<CardFooter className="flex justify-between">
<Button variant="outline" type="button">
</Button>
<Button type="submit"></Button>
</CardFooter>
</form>
</Card>
)
}