27 lines
696 B
TypeScript
27 lines
696 B
TypeScript
import { useEffect, useState } from "react"
|
|
import { forwardRef } from "react"
|
|
interface ChangeValue {
|
|
[key: string]: boolean
|
|
}
|
|
|
|
interface Props extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
label?: string
|
|
error?: string | undefined
|
|
|
|
}
|
|
|
|
export const InputCheckboxR = forwardRef<HTMLInputElement, Props>(
|
|
({ label, error, ...props }, ref) => {
|
|
|
|
|
|
|
|
return (
|
|
<div className="p-2 mb-1 mt-1 bg-green-0 flex items-center">
|
|
|
|
<input ref={ref} type="checkbox" className=" me-2 w-6 h-6 " {...props} />
|
|
{label && <div className="text-md font-normal text-gray-00 font-mono ps-1">{label}</div>}
|
|
|
|
</div>
|
|
)
|
|
}
|
|
) |