|
|
|
@ -11,6 +11,7 @@ function Select({ |
|
|
|
|
name, |
|
|
|
|
defaultValue, |
|
|
|
|
width = "w-1/2", |
|
|
|
|
selectProvince, |
|
|
|
|
}) { |
|
|
|
|
console.log({ options }); |
|
|
|
|
return ( |
|
|
|
@ -22,6 +23,11 @@ function Select({ |
|
|
|
|
onChange={(e) => onChange(name, e.target.value)} |
|
|
|
|
defaultValue={defaultValue} |
|
|
|
|
> |
|
|
|
|
{selectProvince && ( |
|
|
|
|
<option value="" disabled selected hidden> |
|
|
|
|
{selectProvince} |
|
|
|
|
</option> |
|
|
|
|
)} |
|
|
|
|
{options.map((option, index) => ( |
|
|
|
|
<option |
|
|
|
|
key={index} |
|
|
|
@ -50,4 +56,6 @@ export default Select; |
|
|
|
|
Select.defaultProps = { |
|
|
|
|
options: ["Really", "Option 2", "Option 3"], |
|
|
|
|
borderColor: "border-gray-300", |
|
|
|
|
|
|
|
|
|
selectProvince: false, |
|
|
|
|
}; |
|
|
|
|