view products

This commit is contained in:
hamid zarghami
2026-02-14 12:04:59 +03:30
parent a8deff9267
commit fd8a749aed
5 changed files with 167 additions and 12 deletions
+4 -1
View File
@@ -16,6 +16,8 @@ export interface CartQuantityControlProps {
addLabel?: string
/** متن دکمه در حالت loading */
addingLabel?: string
/** عرض کامل (۱۰۰٪) */
fullWidth?: boolean
}
const Spinner = () => (
@@ -30,11 +32,12 @@ export function CartQuantityControl({
addDisabled = false,
addLabel = 'افزودن',
addingLabel = 'در حال افزودن...',
fullWidth = false,
}: CartQuantityControlProps) {
return (
<motion.div
whileTap={{ scale: 1.05 }}
className="bg-background active:drop-shadow-xs max-w-[115px] rounded-md w-full h-8 inline-flex p-1 justify-between items-center gap-2 relative overflow-hidden"
className={`bg-background active:drop-shadow-xs rounded-md h-8 inline-flex p-1 justify-between items-center gap-2 relative overflow-hidden ${fullWidth ? 'w-full' : 'max-w-[115px] w-full'}`}
>
{quantity <= 0 ? (
<button