@codesinger0/shared-components 1.1.82 → 1.1.83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,14 +3,19 @@ import { motion, AnimatePresence } from 'framer-motion';
3
3
  import { ShoppingCart } from 'lucide-react';
4
4
  import { useCart } from '../../context/CartContext';
5
5
 
6
- const FloatingCartButton = () => {
6
+ const FloatingCartButton = ({
7
+ absolute = true,
8
+ icon: CustomIcon = ShoppingCart,
9
+ bgColor = 'bg-orange-500',
10
+ hoverColor = 'hover:brightness-90'
11
+ }) => {
7
12
  const { totalItems, toggleCart } = useCart();
8
13
 
9
14
  return (
10
- <div className="fixed bottom-6 right-6 z-30">
15
+ <div className={`${absolute ? 'fixed bottom-6 right-6' : 'relative'} z-30`}>
11
16
  <motion.button
12
17
  onClick={toggleCart}
13
- className="relative bg-orange-500 text-white p-4 rounded-full shadow-lg hover:brightness-90 transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-primary focus:ring-opacity-50"
18
+ className={`relative ${bgColor} text-white p-4 rounded-full shadow-lg ${hoverColor} transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-primary focus:ring-opacity-50`}
14
19
  style={{
15
20
  transform: 'translate3d(0, 0, 0)',
16
21
  WebkitTransform: 'translate3d(0, 0, 0)',
@@ -21,7 +26,7 @@ const FloatingCartButton = () => {
21
26
  animate={{ scale: 1 }}
22
27
  transition={{ type: "spring", stiffness: 300, damping: 25 }}
23
28
  >
24
- <ShoppingCart size={26} />
29
+ <CustomIcon size={26} />
25
30
  {/* Badge */}
26
31
  <AnimatePresence>
27
32
  {totalItems > 0 && (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codesinger0/shared-components",
3
- "version": "1.1.82",
3
+ "version": "1.1.83",
4
4
  "description": "Shared React components for customer projects",
5
5
  "main": "dist/index.js",
6
6
  "files": [