mirror of
https://github.com/hanzoai/bootnode.git
synced 2026-10-25 02:31:30 +00:00
- Add brand assets and logos - Add KMS integration for secure key management - Add infrastructure configs (cloud providers, monitoring) - Add indexer service with documentation - Update K8s deployments and ingress - Enhance dashboard pages (analytics, assets, infrastructure) - Update auth and API components - Add .gitignore for embedded repos
62 lines
1.7 KiB
TypeScript
62 lines
1.7 KiB
TypeScript
"use client"
|
|
|
|
import * as React from "react"
|
|
import { cn } from "@/lib/utils"
|
|
|
|
interface SelectProps extends React.SelectHTMLAttributes<HTMLSelectElement> {
|
|
onValueChange?: (value: string) => void
|
|
}
|
|
|
|
const Select = React.forwardRef<HTMLSelectElement, SelectProps>(
|
|
({ className, children, onValueChange, onChange, ...props }, ref) => {
|
|
const handleChange = (e: React.ChangeEvent<HTMLSelectElement>) => {
|
|
onChange?.(e)
|
|
onValueChange?.(e.target.value)
|
|
}
|
|
return (
|
|
<select
|
|
ref={ref}
|
|
className={cn(
|
|
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
className
|
|
)}
|
|
onChange={handleChange}
|
|
{...props}
|
|
>
|
|
{children}
|
|
</select>
|
|
)
|
|
}
|
|
)
|
|
Select.displayName = "Select"
|
|
|
|
// Simplified components that work with native select
|
|
const SelectTrigger = React.forwardRef<HTMLSelectElement, SelectProps>(
|
|
({ className, children, ...props }, ref) => (
|
|
<Select ref={ref} className={className} {...props}>
|
|
{children}
|
|
</Select>
|
|
)
|
|
)
|
|
SelectTrigger.displayName = "SelectTrigger"
|
|
|
|
const SelectValue = ({ placeholder }: { placeholder?: string }) => null
|
|
|
|
const SelectContent = ({ children }: { children: React.ReactNode }) => <>{children}</>
|
|
|
|
const SelectItem = ({
|
|
value,
|
|
children,
|
|
disabled
|
|
}: {
|
|
value: string
|
|
children: React.ReactNode
|
|
disabled?: boolean
|
|
}) => (
|
|
<option value={value} disabled={disabled}>
|
|
{children}
|
|
</option>
|
|
)
|
|
|
|
export { Select, SelectTrigger, SelectValue, SelectContent, SelectItem }
|