@codesinger0/shared-components 1.1.102 → 1.1.103
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 +13 -5
- package/package.json +1 -1
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Users, Monitor, Smartphone, ThumbsUp, Paintbrush } from 'lucide-react';
|
|
3
3
|
|
|
4
|
-
const IconGrid = ({
|
|
4
|
+
const IconGrid = ({
|
|
5
|
+
items = [],
|
|
6
|
+
className = '',
|
|
7
|
+
iconSize = 'w-20 h-20',
|
|
8
|
+
iconMarginBottom = 'mb-4',
|
|
9
|
+
padding = 'p-6',
|
|
10
|
+
textSize = 'text-lg',
|
|
11
|
+
maxItemWidth = 'max-w-sm'
|
|
12
|
+
}) => {
|
|
5
13
|
if (!items || items.length === 0) {
|
|
6
14
|
return null;
|
|
7
15
|
}
|
|
@@ -10,18 +18,18 @@ const IconGrid = ({ items = [], className = '' }) => {
|
|
|
10
18
|
const totalItems = items.length;
|
|
11
19
|
const isEven = totalItems % 2 === 0;
|
|
12
20
|
const itemsPerRow = Math.ceil(totalItems / 2);
|
|
13
|
-
|
|
21
|
+
|
|
14
22
|
// Split items into rows
|
|
15
23
|
const topRowCount = isEven ? itemsPerRow : itemsPerRow;
|
|
16
24
|
const topRow = items.slice(0, topRowCount);
|
|
17
25
|
const bottomRow = items.slice(topRowCount);
|
|
18
26
|
|
|
19
27
|
const GridItem = ({ icon: Icon, text }) => (
|
|
20
|
-
<div className=
|
|
21
|
-
<div className=
|
|
28
|
+
<div className={`flex flex-col items-center justify-center ${padding} bg-gradient-to-br from-purple-50 to-indigo-50 rounded-2xl hover:shadow-lg transition-shadow duration-300`}>
|
|
29
|
+
<div className={`${iconSize} ${iconMarginBottom} flex items-center justify-center`}>
|
|
22
30
|
<Icon className="w-full h-full text-main" strokeWidth={1.5} />
|
|
23
31
|
</div>
|
|
24
|
-
<p className=
|
|
32
|
+
<p className={`text-center text-gray-800 font-medium ${textSize}`} dir="rtl">
|
|
25
33
|
{text}
|
|
26
34
|
</p>
|
|
27
35
|
</div>
|