@codesinger0/shared-components 1.1.103 → 1.1.104
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.
- package/dist/components/IconGrid.jsx +20 -13
- package/package.json +1 -1
|
@@ -4,11 +4,12 @@ import { Users, Monitor, Smartphone, ThumbsUp, Paintbrush } from 'lucide-react';
|
|
|
4
4
|
const IconGrid = ({
|
|
5
5
|
items = [],
|
|
6
6
|
className = '',
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
itemWidth = '',
|
|
8
|
+
itemHeight = '',
|
|
9
|
+
itemMinWidth = '',
|
|
10
|
+
itemMinHeight = '',
|
|
11
|
+
itemMaxWidth = 'max-w-sm',
|
|
12
|
+
itemMaxHeight = ''
|
|
12
13
|
}) => {
|
|
13
14
|
if (!items || items.length === 0) {
|
|
14
15
|
return null;
|
|
@@ -25,11 +26,11 @@ const IconGrid = ({
|
|
|
25
26
|
const bottomRow = items.slice(topRowCount);
|
|
26
27
|
|
|
27
28
|
const GridItem = ({ icon: Icon, text }) => (
|
|
28
|
-
<div className=
|
|
29
|
-
<div className=
|
|
29
|
+
<div className="flex flex-col items-center justify-center p-6 bg-gradient-to-br from-purple-50 to-indigo-50 rounded-2xl hover:shadow-lg transition-shadow duration-300">
|
|
30
|
+
<div className="w-20 h-20 mb-4 flex items-center justify-center">
|
|
30
31
|
<Icon className="w-full h-full text-main" strokeWidth={1.5} />
|
|
31
32
|
</div>
|
|
32
|
-
<p className=
|
|
33
|
+
<p className="text-center text-gray-800 font-medium text-lg" dir="rtl">
|
|
33
34
|
{text}
|
|
34
35
|
</p>
|
|
35
36
|
</div>
|
|
@@ -45,9 +46,9 @@ const IconGrid = ({
|
|
|
45
46
|
</div>
|
|
46
47
|
|
|
47
48
|
{/* Desktop: Smart grid */}
|
|
48
|
-
<div className="hidden md:block space-y-4 mt-
|
|
49
|
+
<div className="hidden md:block space-y-4 mt-0 mb-0">
|
|
49
50
|
{/* Top row */}
|
|
50
|
-
<div
|
|
51
|
+
<div
|
|
51
52
|
className="grid gap-4 mb-4"
|
|
52
53
|
style={{
|
|
53
54
|
gridTemplateColumns: `repeat(${topRowCount}, 1fr)`,
|
|
@@ -55,7 +56,10 @@ const IconGrid = ({
|
|
|
55
56
|
}}
|
|
56
57
|
>
|
|
57
58
|
{topRow.map((item, index) => (
|
|
58
|
-
<div
|
|
59
|
+
<div
|
|
60
|
+
key={index}
|
|
61
|
+
className={`w-full ${itemMaxWidth} ${itemWidth} ${itemMinWidth} ${itemHeight} ${itemMinHeight} ${itemMaxHeight}`.trim()}
|
|
62
|
+
>
|
|
59
63
|
<GridItem {...item} />
|
|
60
64
|
</div>
|
|
61
65
|
))}
|
|
@@ -63,7 +67,7 @@ const IconGrid = ({
|
|
|
63
67
|
|
|
64
68
|
{/* Bottom row - centered if fewer items */}
|
|
65
69
|
{bottomRow.length > 0 && (
|
|
66
|
-
<div
|
|
70
|
+
<div
|
|
67
71
|
className="grid gap-4"
|
|
68
72
|
style={{
|
|
69
73
|
gridTemplateColumns: `repeat(${bottomRow.length}, 1fr)`,
|
|
@@ -73,7 +77,10 @@ const IconGrid = ({
|
|
|
73
77
|
}}
|
|
74
78
|
>
|
|
75
79
|
{bottomRow.map((item, index) => (
|
|
76
|
-
<div
|
|
80
|
+
<div
|
|
81
|
+
key={index}
|
|
82
|
+
className={`w-full ${itemMaxWidth} ${itemWidth} ${itemMinWidth} ${itemHeight} ${itemMinHeight} ${itemMaxHeight}`.trim()}
|
|
83
|
+
>
|
|
77
84
|
<GridItem {...item} />
|
|
78
85
|
</div>
|
|
79
86
|
))}
|