sorarebuddy/front/src/components/input_wrapper.tsx
2024-05-23 08:18:54 +04:00

30 lines
488 B
TypeScript

import React from "react";
interface InputWrapperProps {
label: string;
id: string;
children: React.ReactNode;
className?: string;
}
function InputWrapper({
label,
id,
children,
className = "",
}: InputWrapperProps) {
return (
<div className={className}>
<label
className="block text-neutral-700 text-xs font-bold mb-1 pl-1"
htmlFor={id}
>
{label}
</label>
{children}
</div>
);
}
export default InputWrapper;