blob: 69b97a2dfd4d06e868c3951532cd29df54a9137f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import React from 'react';
export interface Props extends React.InputHTMLAttributes<HTMLInputElement> {
label?: string;
}
const Input: React.FC<Props> = ({ label, ...props }) => {
return (
<div className="m-2 mb-4 flex flex-col">
<label htmlFor={props?.name} className="mb-1 text-gray-700">{label}</label>
<input
id={props?.name}
placeholder={label}
className="p-2 border-2 border-black focus:outline-none"
{...props}
/>
</div>
);
};
export default Input;
|