l-min-components 1.0.592 → 1.0.598

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "l-min-components",
3
- "version": "1.0.592",
3
+ "version": "1.0.598",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src/assets",
@@ -49,8 +49,9 @@ export const RadioControl = styled.span`
49
49
 
50
50
  export const RadioLabel = styled.span`
51
51
  margin-left: 8px;
52
- font-size: 16px;
53
- font-weight: bold;
52
+ font-size: ${(props) =>
53
+ props.labelSize ? props.labelSize : "16px"};
54
+ font-weight: 700;
54
55
  color: ${(props) =>
55
56
  props.checked ? props.color : "rgba(159, 159, 159, 0.365)"};
56
- `;
57
+ `;
@@ -25,19 +25,19 @@ const SideMenu = ({
25
25
  isOpen,
26
26
  setIsOpen,
27
27
  affiliatesActive,
28
- setRightComponent
28
+ setRightComponent,
29
29
  }) => {
30
- console.log('user type', userType);
30
+ console.log("user type", userType);
31
31
  // const [isOpen, setIsOpen] = useState(false);
32
32
 
33
- const {setGeneralData, generalData} = useContext(OutletContext)
33
+ const { setGeneralData, generalData } = useContext(OutletContext);
34
34
  const onToggle = () => {
35
35
  setIsOpen(!isOpen);
36
36
  };
37
37
 
38
- useEffect(()=>{
39
- setGeneralData({...generalData, isOpen})
40
- }, [isOpen])
38
+ useEffect(() => {
39
+ setGeneralData({ ...generalData, isOpen });
40
+ }, [isOpen]);
41
41
 
42
42
  // Normal route filter
43
43
  const filteredRoutes = routes.find(
@@ -58,13 +58,14 @@ const SideMenu = ({
58
58
  setRouteFilter(filteredRoutes);
59
59
  }
60
60
  }, [affiliatesActive]);
61
-
61
+
62
62
  // Right bars
63
- const EnterpriseRight = <EnterpriseRightBar />
64
- const InstructorRight = <InstructorRightBar />
63
+ const EnterpriseRight = <EnterpriseRightBar />;
64
+ const InstructorRight = <InstructorRightBar />;
65
65
 
66
66
  const renderNavigationItem = (route, index) => {
67
- const { icon, iconActive, text, notifications, path, affiliates } = route;
67
+ const { icon, iconActive, text, notifications, path, affiliates, newTab } =
68
+ route;
68
69
  const handlePathCheck = () => {
69
70
  let statusText;
70
71
  console.log(window.location.pathname, "pathname");
@@ -248,14 +249,20 @@ const SideMenu = ({
248
249
  window.location.hostname.includes("staging") &&
249
250
  window.location.hostname.includes("developer")
250
251
  ) {
251
- window.location.href = `https://developer-staging-01.learngual.com${path}`;
252
+ newTab
253
+ ? window.open(path, "_blank")
254
+ : (window.location.href = `https://developer-staging-01.learngual.com${path}`);
252
255
  } else if (window.location.hostname.includes("localhost")) {
253
- window.location.href = `http://localhost:${window.location.port}${path}`;
256
+ newTab
257
+ ? window.open(path, "_blank")
258
+ : (window.location.href = `http://localhost:${window.location.port}${path}`);
254
259
  } else if (
255
260
  window.location.hostname.includes("developer") &&
256
261
  !window.location.hostname.includes("staging")
257
262
  ) {
258
- window.location.href = `https://developer.learngual.com${path}`;
263
+ newTab
264
+ ? window.open(path, "_blank")
265
+ : (window.location.href = `https://developer.learngual.com${path}`);
259
266
  }
260
267
 
261
268
  // if (window.location.hostname.includes("staging")) {
@@ -50,7 +50,7 @@ const SideBar = ({ routes }) => {
50
50
  <NavItem key={route.path}>
51
51
  <NavLinkStyled
52
52
  activeClassName="active"
53
- to={route?.path}
53
+ // to={route?.path}
54
54
  onClick={() =>
55
55
  window.open(route.path, route?.newTab ? "_blank" : "")
56
56
  }
@@ -100,7 +100,7 @@ export const sideMenuOptions = [
100
100
  // notifications: 2,
101
101
  },
102
102
  {
103
- path: "//https://developer.learngual.com",
103
+ path: "https://developer.learngual.com",
104
104
  icon: <DocumentIcon />,
105
105
  iconActive: <DocumentIconActive />,
106
106
  text: "Documentation",