anima-ds-nucleus 1.0.13 → 1.0.14
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/package.json
CHANGED
|
@@ -48,7 +48,7 @@ export const HeaderCore = ({
|
|
|
48
48
|
notificationMobileButtonStyle,
|
|
49
49
|
notificationMobileIconWrapperClassName = '',
|
|
50
50
|
notificationMobileIconWrapperStyle,
|
|
51
|
-
notificationMobileIconSize =
|
|
51
|
+
notificationMobileIconSize = 18,
|
|
52
52
|
notificationMobileIconStrokeWidth = 1.5,
|
|
53
53
|
notificationMobileIconStyle,
|
|
54
54
|
showNotificationBadgeOnMobile = false,
|
|
@@ -80,6 +80,7 @@ export const HeaderCore = ({
|
|
|
80
80
|
const [shouldRenderSidebarMobile, setShouldRenderSidebarMobile] = useState(false);
|
|
81
81
|
const [internalSidebarActiveItem, setInternalSidebarActiveItem] = useState(undefined);
|
|
82
82
|
const closeTimeoutRef = useRef(null);
|
|
83
|
+
const bellIconName = notificationCount > 0 ? 'BellAlertIcon' : 'BellIcon';
|
|
83
84
|
|
|
84
85
|
const openSidebarMobile = () => {
|
|
85
86
|
if (closeTimeoutRef.current) {
|
|
@@ -278,8 +279,8 @@ export const HeaderCore = ({
|
|
|
278
279
|
...(notificationDesktopIconWrapperStyle || {}),
|
|
279
280
|
}}
|
|
280
281
|
>
|
|
281
|
-
|
|
282
|
-
name=
|
|
282
|
+
<Icon
|
|
283
|
+
name={bellIconName}
|
|
283
284
|
variant="24-outline"
|
|
284
285
|
size={notificationDesktopIconSize}
|
|
285
286
|
strokeWidth={notificationDesktopIconStrokeWidth}
|
|
@@ -434,24 +435,24 @@ export const HeaderCore = ({
|
|
|
434
435
|
<span
|
|
435
436
|
className={`relative inline-block ${notificationMobileIconWrapperClassName}`}
|
|
436
437
|
style={{
|
|
437
|
-
width: '
|
|
438
|
-
height: '
|
|
438
|
+
width: '24px',
|
|
439
|
+
height: '24px',
|
|
439
440
|
opacity: 1,
|
|
440
441
|
...(notificationMobileIconWrapperStyle || {}),
|
|
441
442
|
}}
|
|
442
443
|
>
|
|
443
|
-
|
|
444
|
-
name=
|
|
444
|
+
<Icon
|
|
445
|
+
name={bellIconName}
|
|
445
446
|
variant="24-outline"
|
|
446
447
|
size={notificationMobileIconSize}
|
|
447
448
|
strokeWidth={notificationMobileIconStrokeWidth}
|
|
448
449
|
className={`color-gray-600 ${notificationIconClassName}`}
|
|
449
450
|
style={{
|
|
450
|
-
width: '
|
|
451
|
-
height: '
|
|
451
|
+
width: '17.75112533569336px',
|
|
452
|
+
height: '18px',
|
|
452
453
|
position: 'absolute',
|
|
453
|
-
top: '
|
|
454
|
-
left: '
|
|
454
|
+
top: '3px',
|
|
455
|
+
left: '3.12px',
|
|
455
456
|
opacity: 1,
|
|
456
457
|
transform: 'rotate(0deg)',
|
|
457
458
|
...(notificationIconStyle || {}),
|
|
@@ -31,6 +31,20 @@ export const SinNotificaciones = {
|
|
|
31
31
|
),
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
+
export const ConNotificaciones = {
|
|
35
|
+
render: () => (
|
|
36
|
+
<HeaderCore
|
|
37
|
+
searchPlaceholder="Buscar empleados, reportes, configuraciones..."
|
|
38
|
+
userName="Maria García Alonso"
|
|
39
|
+
userAvatar="https://i.pravatar.cc/150?img=12"
|
|
40
|
+
notificationCount={7}
|
|
41
|
+
onSearch={(value) => console.log('Búsqueda:', value)}
|
|
42
|
+
onNotificationClick={() => console.log('Notificaciones clickeadas')}
|
|
43
|
+
onUserClick={() => console.log('Usuario clickeado')}
|
|
44
|
+
/>
|
|
45
|
+
),
|
|
46
|
+
};
|
|
47
|
+
|
|
34
48
|
export const ConMuchasNotificaciones = {
|
|
35
49
|
render: () => (
|
|
36
50
|
<HeaderCore
|