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,33 @@
import PropTypes from "prop-types";
import { motion } from "motion/react";
function FormField({ label, children, icon }) {
return (
<div className="flex">
<label className="mr-4 text-lg text-black dark:text-primary-dark w-[17%]">
{label}
</label>
<div className="flex w-full gap-4 items-center">
{children}
{icon && (
<motion.div
whileHover={{ scale: 1.1 }}
whileTap={{ scale: 0.9 }}
className="bg-primary rounded-full p-2 text-white cursor-pointer"
>
{icon}
</motion.div>
)}
</div>
</div>
);
}
FormField.propTypes = {
label: PropTypes.string.isRequired,
children: PropTypes.node.isRequired,
icon: PropTypes.node,
};
export default FormField;