sprint-asia-custom-component 0.1.39 → 0.1.41
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/index.js +4 -5
- package/package.json +1 -1
- package/src/components/header/index.js +7 -9
package/dist/index.js
CHANGED
|
@@ -47018,7 +47018,6 @@
|
|
|
47018
47018
|
const [isNotificationContentVisible, setNotificationContentVisible] = React.useState(false);
|
|
47019
47019
|
const modalRefProfile = React.useRef(null);
|
|
47020
47020
|
const modalRefNotification = React.useRef(null);
|
|
47021
|
-
const navigateTo = useNavigate();
|
|
47022
47021
|
function toggleProfileContent() {
|
|
47023
47022
|
setProfileContentVisible(!isProfileContentVisible);
|
|
47024
47023
|
setNotificationContentVisible(false);
|
|
@@ -47063,12 +47062,12 @@
|
|
|
47063
47062
|
className: "absolute right-20 top-16 z-50"
|
|
47064
47063
|
}, dataNotification.length !== 0 && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
47065
47064
|
className: "z-50 w-48 bg-white border border-neutral40 rounded-md shadow-md"
|
|
47066
|
-
}, dataNotification.map((value, index) => /*#__PURE__*/React__default["default"].createElement("
|
|
47065
|
+
}, dataNotification.map((value, index) => /*#__PURE__*/React__default["default"].createElement("a", {
|
|
47067
47066
|
key: index,
|
|
47068
47067
|
className: `px-2 flex items-center cursor-pointer bg-white hover:bg-neutral20 p-2
|
|
47069
47068
|
${dataProfile.length == 1 ? "rounded-md" : index === 0 ? "rounded-t-md" : index === dataProfile.length - 1 ? 'rounded-b-md' : ""}
|
|
47070
47069
|
`,
|
|
47071
|
-
|
|
47070
|
+
href: `${value.navigate}`
|
|
47072
47071
|
}, /*#__PURE__*/React__default["default"].createElement("p", {
|
|
47073
47072
|
className: "text-sm"
|
|
47074
47073
|
}, value)))))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -47090,12 +47089,12 @@
|
|
|
47090
47089
|
className: "absolute right-0 top-16 z-50"
|
|
47091
47090
|
}, dataProfile.length !== 0 && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
47092
47091
|
className: "z-50 w-48 bg-white border border-neutral40 rounded-md shadow-md"
|
|
47093
|
-
}, dataProfile.map((value, index) => /*#__PURE__*/React__default["default"].createElement("
|
|
47092
|
+
}, dataProfile.map((value, index) => /*#__PURE__*/React__default["default"].createElement("a", {
|
|
47094
47093
|
key: index,
|
|
47095
47094
|
className: `px-2 flex items-center cursor-pointer bg-white hover:bg-neutral20 p-2
|
|
47096
47095
|
${dataProfile.length == 1 ? "rounded-md" : index === 0 ? "rounded-t-md" : index === dataProfile.length - 1 ? 'rounded-b-md' : ""}
|
|
47097
47096
|
`,
|
|
47098
|
-
|
|
47097
|
+
href: `${value.navigate}`
|
|
47099
47098
|
}, /*#__PURE__*/React__default["default"].createElement(value.logo, {
|
|
47100
47099
|
size: 16,
|
|
47101
47100
|
className: "text-neutral300 mr-2"
|
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React, {useState,
|
|
1
|
+
import React, {useState, useRef} from 'react'
|
|
2
2
|
import Profile from '../../assets/images/profile.png';
|
|
3
3
|
import { PiDoorOpenDuotone, PiUserCircleDuotone, PiBellDuotone,PiWalletDuotone } from 'react-icons/pi';
|
|
4
|
-
import { useNavigate } from 'react-router-dom';
|
|
5
4
|
|
|
6
5
|
const Header = ({
|
|
7
6
|
title = "Label",
|
|
@@ -20,7 +19,6 @@ const Header = ({
|
|
|
20
19
|
const [isNotificationContentVisible, setNotificationContentVisible] = useState(false);
|
|
21
20
|
const modalRefProfile = useRef(null);
|
|
22
21
|
const modalRefNotification = useRef(null);
|
|
23
|
-
const navigateTo = useNavigate()
|
|
24
22
|
|
|
25
23
|
function toggleProfileContent() {
|
|
26
24
|
setProfileContentVisible(!isProfileContentVisible)
|
|
@@ -64,7 +62,7 @@ const Header = ({
|
|
|
64
62
|
{dataNotification.length !== 0 && (
|
|
65
63
|
<div className='z-50 w-48 bg-white border border-neutral40 rounded-md shadow-md'>
|
|
66
64
|
{dataNotification.map((value, index) => (
|
|
67
|
-
<
|
|
65
|
+
<a
|
|
68
66
|
key={index}
|
|
69
67
|
className={`px-2 flex items-center cursor-pointer bg-white hover:bg-neutral20 p-2
|
|
70
68
|
${dataProfile.length == 1 ?
|
|
@@ -78,10 +76,10 @@ const Header = ({
|
|
|
78
76
|
: ""
|
|
79
77
|
}
|
|
80
78
|
`}
|
|
81
|
-
|
|
79
|
+
href={`${value.navigate}`}
|
|
82
80
|
>
|
|
83
81
|
<p className='text-sm'>{value}</p>
|
|
84
|
-
</
|
|
82
|
+
</a>
|
|
85
83
|
))}
|
|
86
84
|
</div>
|
|
87
85
|
)}
|
|
@@ -102,7 +100,7 @@ const Header = ({
|
|
|
102
100
|
{dataProfile.length !== 0 && (
|
|
103
101
|
<div className='z-50 w-48 bg-white border border-neutral40 rounded-md shadow-md'>
|
|
104
102
|
{dataProfile.map((value, index) => (
|
|
105
|
-
<
|
|
103
|
+
<a
|
|
106
104
|
key={index}
|
|
107
105
|
className={`px-2 flex items-center cursor-pointer bg-white hover:bg-neutral20 p-2
|
|
108
106
|
${dataProfile.length == 1 ?
|
|
@@ -116,11 +114,11 @@ const Header = ({
|
|
|
116
114
|
: ""
|
|
117
115
|
}
|
|
118
116
|
`}
|
|
119
|
-
|
|
117
|
+
href={`${value.navigate}`}
|
|
120
118
|
>
|
|
121
119
|
<value.logo size={16} className='text-neutral300 mr-2' />
|
|
122
120
|
<p className='text-sm'>{value.title}</p>
|
|
123
|
-
</
|
|
121
|
+
</a>
|
|
124
122
|
))}
|
|
125
123
|
</div>
|
|
126
124
|
)}
|