mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-02-09 02:49:29 +08:00
52 lines
1.8 KiB
TypeScript
52 lines
1.8 KiB
TypeScript
import { Button } from "@/components/ui/button"
|
|
import { Input } from "@/components/ui/input"
|
|
import { Label } from "@/components/ui/label"
|
|
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"
|
|
|
|
export function TabsDemo() {
|
|
return (
|
|
<Tabs defaultValue="account" className="w-[400px]">
|
|
<TabsList>
|
|
<TabsTrigger value="account">Account</TabsTrigger>
|
|
<TabsTrigger value="password">Password</TabsTrigger>
|
|
</TabsList>
|
|
<TabsContent value="account">
|
|
<p className="text-sm text-slate-500 dark:text-slate-400">
|
|
Make changes to your account here. Click save when you're done.
|
|
</p>
|
|
<div className="grid gap-2 py-4">
|
|
<div className="space-y-1">
|
|
<Label htmlFor="name">Name</Label>
|
|
<Input id="name" defaultValue="Pedro Duarte" />
|
|
</div>
|
|
<div className="space-y-1">
|
|
<Label htmlFor="username">Username</Label>
|
|
<Input id="username" defaultValue="@peduarte" />
|
|
</div>
|
|
</div>
|
|
<div className="flex">
|
|
<Button>Save changes</Button>
|
|
</div>
|
|
</TabsContent>
|
|
<TabsContent value="password">
|
|
<p className="text-sm text-slate-500 dark:text-slate-400">
|
|
Change your password here. After saving, you'll be logged out.
|
|
</p>
|
|
<div className="grid gap-2 py-4">
|
|
<div className="space-y-1">
|
|
<Label htmlFor="current">Current password</Label>
|
|
<Input id="current" type="password" />
|
|
</div>
|
|
<div className="space-y-1">
|
|
<Label htmlFor="new">New password</Label>
|
|
<Input id="new" type="password" />
|
|
</div>
|
|
</div>
|
|
<div className="flex">
|
|
<Button>Save password</Button>
|
|
</div>
|
|
</TabsContent>
|
|
</Tabs>
|
|
)
|
|
}
|