2025-01-10 15:59:44 +05:00
|
|
|
import { cn } from '@/lib/utils'
|
2024-12-01 23:19:31 +05:00
|
|
|
import React from 'react'
|
|
|
|
|
2025-01-10 15:59:44 +05:00
|
|
|
export default function InputReadOnly({ label, value, labelClassName, className }: { label: string, value: string, labelClassName?: string, className?: string }) {
|
2024-12-01 23:19:31 +05:00
|
|
|
return (
|
2025-01-10 15:59:44 +05:00
|
|
|
<div className={cn("relative rounded-lg border border-input bg-background shadow-sm shadow-black/5 transition-shadow focus-within:border-ring focus-within:outline-none focus-within:ring-[3px] focus-within:ring-ring/20 has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-80 [&:has(input:is(:disabled))_*]:pointer-events-none", className)}>
|
|
|
|
<label htmlFor="input-33" className={cn("block px-3 pt-2 text-xs font-medium", labelClassName)}>
|
2024-12-01 23:19:31 +05:00
|
|
|
{label}
|
|
|
|
</label>
|
|
|
|
<input
|
|
|
|
id="input-33"
|
|
|
|
className="flex h-10 w-full bg-transparent px-3 pb-2 text-sm text-foreground placeholder:text-muted-foreground/70 focus-visible:outline-none"
|
|
|
|
placeholder={value}
|
|
|
|
disabled
|
|
|
|
value={value}
|
|
|
|
type="text"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
)
|
|
|
|
}
|