mirror of
https://github.com/hanzoai/shadcn.git
synced 2026-10-30 18:22:59 +00:00
Squash merge of shadcn-ui/ui main branch into hanzo/ui, bringing in: - [email protected] through [email protected] releases - New apps/v4 directory structure - Registry system improvements and MCP server - Framework support (Vue, Svelte, React Native) - New templates (vite-app, monorepo-next, laravel) - Zod 4 compatibility (scoped override for zod@>4) - Test fixture corrections for alias resolution All 867 merge conflicts resolved preserving Hanzo customizations. 1020/1020 shadcn tests pass.
55 lines
1.5 KiB
TypeScript
55 lines
1.5 KiB
TypeScript
"use client"
|
|
|
|
import * as React from "react"
|
|
import { Button } from "@/examples/base/ui/button"
|
|
import { ButtonGroup } from "@/examples/base/ui/button-group"
|
|
import { Input } from "@/examples/base/ui/input"
|
|
import {
|
|
Select,
|
|
SelectContent,
|
|
SelectGroup,
|
|
SelectItem,
|
|
SelectTrigger,
|
|
} from "@/examples/base/ui/select"
|
|
import { ArrowRightIcon } from "lucide-react"
|
|
|
|
const CURRENCIES = [
|
|
{ label: "US Dollar", value: "$" },
|
|
{ label: "Euro", value: "€" },
|
|
{ label: "British Pound", value: "£" },
|
|
]
|
|
|
|
export default function ButtonGroupSelect() {
|
|
const [currency, setCurrency] = React.useState("$")
|
|
|
|
return (
|
|
<ButtonGroup>
|
|
<ButtonGroup>
|
|
<Select
|
|
items={CURRENCIES}
|
|
value={currency}
|
|
onValueChange={(value) => setCurrency(value as string)}
|
|
>
|
|
<SelectTrigger className="font-mono">{currency}</SelectTrigger>
|
|
<SelectContent alignItemWithTrigger={false} align="start">
|
|
<SelectGroup>
|
|
{CURRENCIES.map((item) => (
|
|
<SelectItem key={item.value} value={item.value}>
|
|
{item.value}{" "}
|
|
<span className="text-muted-foreground">{item.label}</span>
|
|
</SelectItem>
|
|
))}
|
|
</SelectGroup>
|
|
</SelectContent>
|
|
</Select>
|
|
<Input placeholder="10.00" pattern="[0-9]*" />
|
|
</ButtonGroup>
|
|
<ButtonGroup>
|
|
<Button aria-label="Send" size="icon" variant="outline">
|
|
<ArrowRightIcon />
|
|
</Button>
|
|
</ButtonGroup>
|
|
</ButtonGroup>
|
|
)
|
|
}
|