Add AccountCreation component and product list functionality; update routing and translations

This commit is contained in:
2024-12-22 22:42:48 +05:30
parent a6a67d69d5
commit 8cee8e0383
10 changed files with 517 additions and 3 deletions

View File

@@ -0,0 +1,37 @@
import PropTypes from "prop-types";
function FormSelect({ value, onChange, options, className }) {
return (
<select
value={value}
className={
"w-1/4 h-10 px-2 rounded-full dark:bg-white dark:text-grey border-2 text-grey focus:outline-grey " +
className
}
onChange={onChange}
>
<option disabled value="">
Select
</option>
{options.map(({ value, label }) => (
<option key={value} value={value}>
{label}
</option>
))}
</select>
);
}
FormSelect.propTypes = {
value: PropTypes.string.isRequired,
onChange: PropTypes.func.isRequired,
className: PropTypes.string,
options: PropTypes.arrayOf(
PropTypes.shape({
value: PropTypes.string.isRequired,
label: PropTypes.string.isRequired,
})
).isRequired,
};
export default FormSelect;