"use client"; import { PRIMARY_COLOR } from "@/config/const"; import { Add, Minus, Trash } from "iconsax-react"; import React from "react"; type CartControlsProps = { quantity: number; onChange: (next: number) => void; onRemove: () => void; min?: number; max?: number; className?: string; }; export default function CartControls(props: CartControlsProps) { const { quantity, onChange, onRemove, min = 1, max, className } = props; const canDecrement = quantity > min; const canIncrement = typeof max === "number" ? quantity < max : true; return (
{quantity}
); }