This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
<link rel="stylesheet" href="style.css"> | |
</head> | |
<body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Input = ({label, type="text", name, value, onChange}) => { | |
return ( | |
<div className='mt-2'> | |
<label className='font-medium text-sm'>{label} <span className='text-red-600'>*</span></label> | |
<input className='border border-gray-200 rounded-sm w-full p-1.5 mt-1' type={type} name={name} value={value} onChange={onChange}/> | |
</div> | |
) | |
} | |
export default Input |