contentoh-components-library 21.2.22 → 21.2.23

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.
@@ -39,33 +39,25 @@ VerticalSideMenuMainPageDefault.args = {
39
39
  menuoption: [{
40
40
  icon: _iconSpeedometer.default,
41
41
  path: "/Dashboard",
42
- title: "Dashborad"
42
+ title: "Dashboard"
43
+ }, {
44
+ icon: _iconGroup.default,
45
+ path: "/Products",
46
+ title: "Productos"
43
47
  }, {
44
48
  icon: _iconProduct.default,
45
- path: "/products",
46
- title: "Productos",
49
+ path: "/Orders",
50
+ title: "Proveedor",
47
51
  suboption: [{
48
- path: "/Dashboard",
49
- title: "General"
52
+ path: "/Orders",
53
+ title: "Ordenes"
50
54
  }, {
51
- path: "/AddProducts",
52
- title: "Agregar Producto"
55
+ path: "/Entregas",
56
+ title: "Entregas"
53
57
  }]
54
- }, {
55
- icon: _iconGroup.default,
56
- path: "/providers",
57
- title: "Proovedores"
58
- }, {
59
- icon: _iconLogo.default,
60
- path: "/ContentohProducts",
61
- title: "Content Oh!",
62
- suboption: {
63
- path: "/ContentohProducts",
64
- title: "Productos"
65
- }
66
58
  }, {
67
59
  icon: _iconTask.default,
68
- path: "/tasks/7",
60
+ path: "/tasks",
69
61
  title: "Tareas"
70
62
  }]
71
63
  };
@@ -52,8 +52,8 @@ var VerticalSideMenuMainPage = function VerticalSideMenuMainPage(_ref) {
52
52
  var _item$suboption;
53
53
 
54
54
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
55
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactRouterDom.NavLink, {
56
- to: item.path,
55
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("a", {
56
+ href: item.path,
57
57
  className: "option-link",
58
58
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
59
59
  src: item.icon,
@@ -61,12 +61,12 @@ var VerticalSideMenuMainPage = function VerticalSideMenuMainPage(_ref) {
61
61
  }), trueBar && /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
62
62
  children: item.title
63
63
  })]
64
- }), item.suboption === undefined ? "" : /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
64
+ }), item.suboption !== undefined && /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
65
65
  children: item === null || item === void 0 ? void 0 : (_item$suboption = item.suboption) === null || _item$suboption === void 0 ? void 0 : _item$suboption.map(function (subitem) {
66
66
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
67
67
  className: "sub-option",
68
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.NavLink, {
69
- to: subitem.path,
68
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
69
+ href: subitem.path,
70
70
  className: "sub-option-link",
71
71
  children: trueBar && /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
72
72
  children: subitem.title
@@ -15,7 +15,7 @@ var _templateObject;
15
15
 
16
16
  var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n height: 98%;\n box-sizing: border-box;\n padding: 23px 10px 70px 10px;\n flex-direction: column;\n justify-content: space-between;\n overflow: auto;\n width: ", "px;\n border-radius: ", "px;\n background: linear-gradient(180deg, #e33aa9 0%, #3b1366 100%);\n scrollbar-width: none;\n display: flex;\n text-align: center;\n transition: width 0.3s linear;\n margin: 10px 0 10px 20px;\n & + * {\n margin-left: 30px;\n }\n .navbar-top {\n transition: all 0.3s linear;\n .option {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n margin-top: ", "%;\n padding-left: ", "px;\n .active {\n background: #e33aa9;\n }\n & + div {\n margin-top: 5px;\n }\n a {\n height: ", "px;\n display: flex;\n justify-content: ", ";\n border-radius: ", "px;\n align-items: center;\n font-family: sans-serif;\n font-style: normal;\n font-weight: 400;\n font-size: 18px;\n line-height: 21px;\n letter-spacing: -0.015em;\n color: #fafafa;\n text-decoration: none;\n &.option-link {\n cursor: pointer;\n width: ", "px;\n margin: 5px 0;\n padding-left: ", "px;\n }\n p {\n cursor: pointer;\n margin: 0%;\n pointer-events: none;\n }\n img {\n width: 22px;\n & + * {\n margin-left: 12px;\n }\n }\n }\n .option-link:hover {\n background: #e33aa9;\n }\n .sub-option {\n display: flex;\n flex-direction: column;\n padding-left: ", "px;\n height: auto;\n width: auto;\n a {\n display: flex;\n justify-content: flex-start;\n text-decoration: none;\n position: relative;\n font-size: 13px;\n border-left: 1px solid #f0eef2;\n border-radius: 0;\n color: #f0eef2;\n padding-top: 14px;\n padding-left: 12px;\n height: 25px;\n &::before {\n border-left: 1px solid #e33aa9;\n width: 10px;\n content: \"\";\n border-radius: 50%;\n height: 10px;\n background-color: white;\n position: absolute;\n bottom: 0;\n left: ", "%;\n }\n &.active {\n background: none;\n &::before {\n background-color: #e33aa9;\n }\n }\n }\n }\n }\n }\n"])), function (_ref) {
17
17
  var bar = _ref.bar;
18
- return bar ? 270 : 58;
18
+ return bar ? 210 : 58;
19
19
  }, function (_ref2) {
20
20
  var bar = _ref2.bar;
21
21
  return bar ? 20 : 50;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentoh-components-library",
3
- "version": "21.2.22",
3
+ "version": "21.2.23",
4
4
  "dependencies": {
5
5
  "@aws-amplify/auth": "^4.5.3",
6
6
  "@aws-amplify/datastore": "^3.11.0",
@@ -15,21 +15,26 @@ const Template = (args) => <VerticalSideMenuMainPage {...args} />;
15
15
  export const VerticalSideMenuMainPageDefault = Template.bind({});
16
16
 
17
17
  VerticalSideMenuMainPageDefault.args = {
18
- menuoption: [
19
- { icon: iconSpeedometer, path: "/Dashboard", title: "Dashborad" },
18
+ menuoption : [
19
+ { icon: iconSpeedometer, path: "/Dashboard", title: "Dashboard" },
20
20
  {
21
- icon: iconProduct,
22
- path: "/products",
21
+ icon: iconGroup,
22
+ path: "/Products",
23
23
  title: "Productos",
24
- suboption: [{ path: "/Dashboard", title: "General" },{ path: "/AddProducts", title: "Agregar Producto" }],
25
24
  },
26
- { icon: iconGroup, path: "/providers", title: "Proovedores" },
27
- {
28
- icon: iconLogo,
29
- path: "/ContentohProducts",
30
- title: "Content Oh!",
31
- suboption: { path: "/ContentohProducts", title: "Productos" },
25
+ {
26
+ icon: iconProduct,
27
+ path: "/Orders",
28
+ title: "Proveedor",
29
+ suboption: [
30
+ { path: "/Orders", title: "Ordenes" },
31
+ { path: "/Entregas", title: "Entregas" },
32
+ ],
33
+ },
34
+ {
35
+ icon: iconTask,
36
+ path: "/tasks",
37
+ title: "Tareas",
32
38
  },
33
- { icon: iconTask, path: "/tasks/7", title: "Tareas" },
34
- ],
39
+ ]
35
40
  };
@@ -22,19 +22,17 @@ export const VerticalSideMenuMainPage = ({ menuoption }) => {
22
22
  <div className="option">
23
23
  {menuoption.map((item, index) => (
24
24
  <div key={index}>
25
- <NavLink to={item.path} className="option-link">
25
+ <a href={item.path} className="option-link">
26
26
  <img src={item.icon} alt={item.title}></img>
27
27
  {trueBar && <p>{item.title}</p>}
28
- </NavLink>
29
- {item.suboption === undefined ? (
30
- ""
31
- ) : (
28
+ </a>
29
+ {item.suboption !== undefined && (
32
30
  <>
33
31
  {item?.suboption?.map((subitem) => (
34
32
  <div className="sub-option">
35
- <NavLink to={subitem.path} className="sub-option-link">
33
+ <a href={subitem.path} className="sub-option-link">
36
34
  {trueBar && <p>{subitem.title}</p>}
37
- </NavLink>
35
+ </a>
38
36
  </div>
39
37
  ))}
40
38
  </>
@@ -7,7 +7,7 @@ export const Container = styled.div`
7
7
  flex-direction: column;
8
8
  justify-content: space-between;
9
9
  overflow: auto;
10
- width: ${({ bar }) => (bar ? 270 : 58)}px;
10
+ width: ${({ bar }) => (bar ? 210 : 58)}px;
11
11
  border-radius: ${({ bar }) => (bar ? 20 : 50)}px;
12
12
  background: linear-gradient(180deg, #e33aa9 0%, #3b1366 100%);
13
13
  scrollbar-width: none;
@@ -106,4 +106,4 @@ export const Container = styled.div`
106
106
  }
107
107
  }
108
108
  }
109
- `;
109
+ `;