Initial commit: NestJS NextJS pnpm monorepo
This commit is contained in:
commit
610dcf202b
175 files changed
+25172
No files matched your search
@@ -0,0 +1,30 @@
|
||||
import { forwardRef } from "react"
|
||||
|
||||
interface InputTextProps
|
||||
extends React.InputHTMLAttributes<HTMLInputElement> {
|
||||
label?: string
|
||||
error?: string | undefined
|
||||
}
|
||||
|
||||
export const InputTextR = forwardRef<HTMLInputElement, InputTextProps>(
|
||||
({ label, error, ...props }, ref) => {
|
||||
return (
|
||||
<div className="mb-1 bg-green-00">
|
||||
{label && (
|
||||
<label className="text-sm font-normal text-gray-600 font-mono ps-1">
|
||||
{label}
|
||||
</label>
|
||||
)}
|
||||
|
||||
<input ref={ref}
|
||||
className={`w-full ps-2 h-7 border rounded ${error ? "border-red-500" : "border-gray-300"} focus:outline-none focus:ring-1 focus:ring-blue-800`}
|
||||
{...props}
|
||||
/>
|
||||
|
||||
{false && error && <p className="text-red-500 text-sm mt-1">{error}</p>}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
InputTextR.displayName = "InputR"
|
||||
Reference in new issue
Block a user