contentoh-components-library 21.1.20 → 21.1.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.
- package/dist/assets/images/sliderToolTip/slide21.svg +9 -0
- package/dist/assets/images/sliderToolTip/slide22.svg +9 -0
- package/dist/assets/images/sliderToolTip/slide23.svg +9 -0
- package/dist/components/atoms/CheckBox/styles.js +1 -1
- package/dist/components/atoms/ListCommercialRetailers/ListCommercialRetailers.stories.js +36 -0
- package/dist/components/atoms/ListCommercialRetailers/index.js +64 -0
- package/dist/components/atoms/ListCommercialRetailers/styles.js +20 -0
- package/dist/components/atoms/MenuCommercialRetailers/MenuCommercialRetailers.stories.js +37 -0
- package/dist/components/atoms/MenuCommercialRetailers/index.js +25 -0
- package/dist/components/atoms/MenuCommercialRetailers/styles.js +20 -0
- package/dist/components/atoms/MenuProductImage/MenuProductImage.stories.js +28 -0
- package/dist/components/atoms/MenuProductImage/index.js +88 -0
- package/dist/components/atoms/MenuProductImage/styles.js +20 -0
- package/dist/components/atoms/SliderToolTip/SliderToolTip.stories.js +67 -13
- package/dist/components/atoms/SliderToolTip/index.js +64 -134
- package/dist/components/atoms/SliderToolTip/styles.js +2 -2
- package/dist/components/atoms/VerticalSideMenuMainPage/VerticalSideMenuMainPage.stories.js +44 -1
- package/dist/components/atoms/VerticalSideMenuMainPage/index.js +49 -48
- package/dist/components/atoms/VerticalSideMenuMainPage/styles.js +12 -3
- package/dist/components/molecules/ApproveRejetPanel/ApproveRejetPanel.stories.js +25 -0
- package/dist/components/molecules/ApproveRejetPanel/index.js +49 -0
- package/dist/components/molecules/ApproveRejetPanel/styles.js +18 -0
- package/dist/components/molecules/SignInLoginCreationApp/SignInLogin.stories.js +28 -0
- package/dist/components/molecules/SignInLoginCreationApp/index.js +270 -0
- package/dist/components/molecules/SignInLoginCreationApp/styles.js +20 -0
- package/dist/components/molecules/StatusAsignationInfo/index.js +35 -1
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +54 -18
- package/dist/components/pages/ProviderProductEdition/index.js +13 -5
- package/dist/global-files/global-styles.css +0 -1
- package/package.json +1 -1
- package/src/assets/images/sliderToolTip/slide21.svg +9 -0
- package/src/assets/images/sliderToolTip/slide22.svg +9 -0
- package/src/assets/images/sliderToolTip/slide23.svg +9 -0
- package/src/components/atoms/CheckBox/styles.js +0 -1
- package/src/components/atoms/SliderToolTip/SliderToolTip.stories.js +77 -11
- package/src/components/atoms/SliderToolTip/index.js +91 -154
- package/src/components/atoms/SliderToolTip/styles.js +48 -22
- package/src/components/atoms/VerticalSideMenuMainPage/VerticalSideMenuMainPage.stories.js +24 -1
- package/src/components/atoms/VerticalSideMenuMainPage/index.js +41 -30
- package/src/components/atoms/VerticalSideMenuMainPage/styles.js +70 -18
- package/src/components/molecules/StatusAsignationInfo/index.js +37 -0
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +60 -18
- package/src/components/pages/ProviderProductEdition/index.js +13 -4
- package/dist/components/atoms/Percent/Percent.stories.js +0 -39
- package/dist/components/atoms/Percent/index.js +0 -39
- package/dist/components/atoms/Percent/styles.js +0 -20
- package/dist/components/molecules/TextAndGradient/TextAndGradient.stories.js +0 -31
- package/dist/components/molecules/TextAndGradient/index.js +0 -36
- package/dist/components/molecules/TextAndGradient/styles.js +0 -18
- package/src/components/pages/RegistrationLoginFirstStep/RegistrationLoginFirstStep.stories.js +0 -17
- package/src/components/pages/RegistrationLoginFirstStep/index.js +0 -160
- package/src/components/pages/RegistrationLoginFirstStep/styles.js +0 -85
|
@@ -1,23 +1,89 @@
|
|
|
1
1
|
import { SliderToolTip } from "./index";
|
|
2
2
|
import InfoIcon from "../../../assets/images/sliderToolTip/infoIcon.svg";
|
|
3
|
-
import Slide1 from "../../../assets/images/sliderToolTip/
|
|
4
|
-
import Slide2 from "../../../assets/images/sliderToolTip/
|
|
5
|
-
import Slide3 from "../../../assets/images/sliderToolTip/
|
|
6
|
-
import
|
|
7
|
-
import
|
|
3
|
+
import Slide1 from "../../../assets/images/sliderToolTip/slide21.svg";
|
|
4
|
+
import Slide2 from "../../../assets/images/sliderToolTip/slide22.svg";
|
|
5
|
+
import Slide3 from "../../../assets/images/sliderToolTip/slide23.svg";
|
|
6
|
+
import Slide1_1 from "../../../assets/images/sliderToolTip/slide1.svg";
|
|
7
|
+
import Slide1_2 from "../../../assets/images/sliderToolTip/slide2.svg";
|
|
8
|
+
import Slide1_3 from "../../../assets/images/sliderToolTip/slide3.svg";
|
|
9
|
+
import Slide1_4 from "../../../assets/images/sliderToolTip/slide4.svg";
|
|
10
|
+
import Slide1_5 from "../../../assets/images/sliderToolTip/slide5.svg";
|
|
8
11
|
|
|
9
12
|
export default {
|
|
10
13
|
title: "Components/atoms/SliderToolTip",
|
|
11
14
|
component: SliderToolTip,
|
|
15
|
+
argTypes: {
|
|
16
|
+
iconSize: {
|
|
17
|
+
options: ["big-image", "medium-image", "small-image"],
|
|
18
|
+
control: { type: "select" },
|
|
19
|
+
},
|
|
20
|
+
slidePosition: {
|
|
21
|
+
options: ["top-slide", "bottom-slide"],
|
|
22
|
+
control: { type: "select" },
|
|
23
|
+
},
|
|
24
|
+
},
|
|
12
25
|
};
|
|
13
26
|
|
|
14
27
|
const Template = (args) => <SliderToolTip {...args} />;
|
|
15
28
|
|
|
16
29
|
export const SliderToolTipDefault = Template.bind({});
|
|
30
|
+
SliderToolTipDefault.args = {
|
|
31
|
+
infoIcon: InfoIcon,
|
|
32
|
+
slidefront: [
|
|
33
|
+
{
|
|
34
|
+
slide: Slide1,
|
|
35
|
+
title: "Valida tu producto en cada activo digital",
|
|
36
|
+
description:
|
|
37
|
+
"Al solicitar a Content-oh! podrás validar la información, imágenes y documentación de tu producto, esto hará más sencillo que puedas aprobar o rechazar el contenido.",
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
slide: Slide2,
|
|
41
|
+
title: "Aprueba o rechaza con un clic",
|
|
42
|
+
description:
|
|
43
|
+
"Cuando termines de revisar tu información, elige si aproebas o rechazas, esto enviara una notificiación a nuestro equipo, para continuar o corregir el producto.",
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
slide: Slide3,
|
|
47
|
+
title: "Estatus de tu producto en el proceso",
|
|
48
|
+
description:
|
|
49
|
+
"La mayor parte del proceso podrás identificar que estatus tiene tu producto, esto dara visibilidad a todo tu equipo para saber la etapa se encuentra.",
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
slidePosition: "bottom-slide",
|
|
53
|
+
iconSize: "medium-image",
|
|
54
|
+
};
|
|
17
55
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
56
|
+
export const SliderToolTipSendContentoh = Template.bind({});
|
|
57
|
+
SliderToolTipSendContentoh.args = {
|
|
58
|
+
infoIcon: InfoIcon,
|
|
59
|
+
slidefront: [
|
|
60
|
+
{
|
|
61
|
+
slide: Slide1_1,
|
|
62
|
+
description:
|
|
63
|
+
"Creamos tu contenido, y todo lo que haga falta para tu producto, cada sección puedes socilitar contenido enriquecido, y nosotros lo haremos por ti.",
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
slide: Slide1_2,
|
|
67
|
+
description:
|
|
68
|
+
"Puedes agregar solicitudes de contenido enriquecido a tu carrito de compra las veces que sean necesarias. Una vez completada tu lista con los servicios necesitados sigue el proceso de compra en checkout.",
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
slide: Slide1_3,
|
|
72
|
+
description:
|
|
73
|
+
"Revisa el contenido que deseas solicilitar, valida y tambien puedes agregar contenido extra, traducciones, o simplemente completar el checkout.",
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
slide: Slide1_4,
|
|
77
|
+
description:
|
|
78
|
+
"Elige el tipo de entrega de tu producto, puedes ser recolección en el lugar o por el contrario puedes dejarlo en nuestras oficinas.",
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
slide: Slide1_5,
|
|
82
|
+
title: "Bienvenido al modo Content-oh!",
|
|
83
|
+
description:
|
|
84
|
+
"Finalmente elige la forma de pago que más te guste, procede con el pago y listo.",
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
slidePosition: "top-slide",
|
|
88
|
+
iconSize: "big-image",
|
|
89
|
+
};
|
|
@@ -2,12 +2,10 @@ import { Container, Slider } from "./styles";
|
|
|
2
2
|
import { useEffect, useState } from "react";
|
|
3
3
|
|
|
4
4
|
export const SliderToolTip = ({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Slide4,
|
|
10
|
-
Slide5,
|
|
5
|
+
infoIcon,
|
|
6
|
+
slidefront,
|
|
7
|
+
iconSize,
|
|
8
|
+
slidePosition,
|
|
11
9
|
}) => {
|
|
12
10
|
const [showMenu, setShowMenu] = useState(false);
|
|
13
11
|
const closeMenu = (e) => {
|
|
@@ -22,161 +20,100 @@ export const SliderToolTip = ({
|
|
|
22
20
|
}
|
|
23
21
|
}, [showMenu]);
|
|
24
22
|
const color = (id) => {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
document.getElementById("slidea4").style.backgroundColor = "#C4C4C4";
|
|
37
|
-
document.getElementById("slidea5").style.backgroundColor = "#C4C4C4";
|
|
38
|
-
}
|
|
39
|
-
if (id === "slidea3") {
|
|
40
|
-
document.getElementById("slidea1").style.backgroundColor = "#FAFAFA";
|
|
41
|
-
document.getElementById("slidea2").style.backgroundColor = "#FAFAFA";
|
|
42
|
-
document.getElementById("slidea3").style.backgroundColor = "#E33AA9";
|
|
43
|
-
document.getElementById("slidea4").style.backgroundColor = "#C4C4C4";
|
|
44
|
-
document.getElementById("slidea5").style.backgroundColor = "#C4C4C4";
|
|
45
|
-
}
|
|
46
|
-
if (id === "slidea4") {
|
|
47
|
-
document.getElementById("slidea1").style.backgroundColor = "#FAFAFA";
|
|
48
|
-
document.getElementById("slidea2").style.backgroundColor = "#FAFAFA";
|
|
49
|
-
document.getElementById("slidea3").style.backgroundColor = "#FAFAFA";
|
|
50
|
-
document.getElementById("slidea4").style.backgroundColor = "#E33AA9";
|
|
51
|
-
document.getElementById("slidea5").style.backgroundColor = "#C4C4C4";
|
|
52
|
-
}
|
|
53
|
-
if (id === "slidea5") {
|
|
54
|
-
document.getElementById("button-slide").style.display = "flex";
|
|
23
|
+
for (let i = 1; i <= slidefront.length; i++) {
|
|
24
|
+
if (id === `slidea${i}`) {
|
|
25
|
+
document.getElementById(`slidea${i}`).style.backgroundColor = "#E33AA9";
|
|
26
|
+
if (id === `slidea${slidefront.length}`) {
|
|
27
|
+
document.getElementById("button-slide").style.display = "flex";
|
|
28
|
+
}
|
|
29
|
+
} else if (id > `slidea${i}`) {
|
|
30
|
+
document.getElementById(`slidea${i}`).style.backgroundColor = "#FAFAFA";
|
|
31
|
+
} else if (id < `slidea${i}`) {
|
|
32
|
+
document.getElementById(`slidea${i}`).style.backgroundColor = "#C4C4C4";
|
|
33
|
+
}
|
|
55
34
|
}
|
|
56
35
|
};
|
|
57
36
|
|
|
58
37
|
return (
|
|
59
38
|
<>
|
|
60
|
-
<Container
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
39
|
+
<Container className="container-slider">
|
|
40
|
+
<img
|
|
41
|
+
src={infoIcon}
|
|
42
|
+
alt="info icon"
|
|
43
|
+
className={iconSize}
|
|
44
|
+
onClick={(e) => {
|
|
45
|
+
setShowMenu(!showMenu);
|
|
46
|
+
if (showMenu) {
|
|
47
|
+
document.removeEventListener("click", closeMenu, false);
|
|
48
|
+
}
|
|
49
|
+
}}
|
|
50
|
+
/>
|
|
70
51
|
{showMenu && (
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
color("slidea1");
|
|
136
|
-
}}
|
|
137
|
-
></a>
|
|
138
|
-
</li>
|
|
139
|
-
<li>
|
|
140
|
-
<a
|
|
141
|
-
href="#slide2"
|
|
142
|
-
id="slidea2"
|
|
143
|
-
onClick={(e) => {
|
|
144
|
-
color("slidea2");
|
|
145
|
-
}}
|
|
146
|
-
></a>
|
|
147
|
-
</li>
|
|
148
|
-
<li>
|
|
149
|
-
<a
|
|
150
|
-
href="#slide3"
|
|
151
|
-
id="slidea3"
|
|
152
|
-
onClick={(e) => {
|
|
153
|
-
color("slidea3");
|
|
154
|
-
}}
|
|
155
|
-
></a>
|
|
156
|
-
</li>
|
|
157
|
-
<li>
|
|
158
|
-
<a
|
|
159
|
-
href="#slide4"
|
|
160
|
-
id="slidea4"
|
|
161
|
-
onClick={(e) => {
|
|
162
|
-
color("slidea4");
|
|
163
|
-
}}
|
|
164
|
-
></a>
|
|
165
|
-
</li>
|
|
166
|
-
<li>
|
|
167
|
-
<a
|
|
168
|
-
href="#slide5"
|
|
169
|
-
id="slidea5"
|
|
170
|
-
onClick={(e) => {
|
|
171
|
-
color("slidea5");
|
|
172
|
-
}}
|
|
173
|
-
></a>
|
|
174
|
-
</li>
|
|
175
|
-
</ul>
|
|
176
|
-
</Slider>
|
|
177
|
-
)}
|
|
52
|
+
<Slider
|
|
53
|
+
id="div-slider"
|
|
54
|
+
className={slidePosition}
|
|
55
|
+
length={slidefront.length}
|
|
56
|
+
>
|
|
57
|
+
<ul className="slider">
|
|
58
|
+
{slidefront.map((item, index) => (
|
|
59
|
+
<li
|
|
60
|
+
id={`slide${index + 1}`}
|
|
61
|
+
className={
|
|
62
|
+
`slide${index + 1}` === `slide${slidefront.length}`
|
|
63
|
+
? "end-div"
|
|
64
|
+
: ""
|
|
65
|
+
}
|
|
66
|
+
>
|
|
67
|
+
<div>
|
|
68
|
+
<img src={slidefront[index].slide} />
|
|
69
|
+
</div>
|
|
70
|
+
{`slide${index + 1}` === `slide${slidefront.length}` ? (
|
|
71
|
+
<>
|
|
72
|
+
<div className="lema-end">
|
|
73
|
+
<span>{slidefront[index].title}</span>
|
|
74
|
+
<p>{slidefront[index].description}</p>
|
|
75
|
+
</div>
|
|
76
|
+
<button
|
|
77
|
+
id="button-slide"
|
|
78
|
+
onClick={(e) => {
|
|
79
|
+
document.removeEventListener(
|
|
80
|
+
"click",
|
|
81
|
+
closeMenu,
|
|
82
|
+
false
|
|
83
|
+
);
|
|
84
|
+
setShowMenu(false);
|
|
85
|
+
}}
|
|
86
|
+
>
|
|
87
|
+
Cerrar
|
|
88
|
+
</button>
|
|
89
|
+
</>
|
|
90
|
+
) : (
|
|
91
|
+
<>
|
|
92
|
+
{slidefront[index].title !== undefined ? (
|
|
93
|
+
<span>{slidefront[index].title}</span>
|
|
94
|
+
) : null}
|
|
95
|
+
<p>{slidefront[index].description}</p>
|
|
96
|
+
</>
|
|
97
|
+
)}
|
|
98
|
+
</li>
|
|
99
|
+
))}
|
|
100
|
+
</ul>
|
|
101
|
+
<ul className="menu">
|
|
102
|
+
{slidefront.map((item, index) => (
|
|
103
|
+
<li>
|
|
104
|
+
<a
|
|
105
|
+
href={`#slide${index + 1}`}
|
|
106
|
+
id={`slidea${index + 1}`}
|
|
107
|
+
onClick={(e) => {
|
|
108
|
+
color(`slidea${index + 1}`);
|
|
109
|
+
}}
|
|
110
|
+
></a>
|
|
111
|
+
</li>
|
|
112
|
+
))}
|
|
113
|
+
</ul>
|
|
114
|
+
</Slider>
|
|
115
|
+
)}
|
|
178
116
|
</Container>
|
|
179
|
-
|
|
180
117
|
</>
|
|
181
118
|
);
|
|
182
119
|
};
|
|
@@ -4,22 +4,42 @@ import { GlobalColors, FontFamily } from "../../../global-files/variables";
|
|
|
4
4
|
export const Container = styled.div`
|
|
5
5
|
background: transparent;
|
|
6
6
|
cursor: pointer;
|
|
7
|
-
width: 40px !important;
|
|
8
|
-
margin: 9px;
|
|
9
7
|
position: relative;
|
|
8
|
+
img {
|
|
9
|
+
&.small-image {
|
|
10
|
+
width: 20px;
|
|
11
|
+
height: 20px;
|
|
12
|
+
}
|
|
13
|
+
&.medium-image {
|
|
14
|
+
width: 30px;
|
|
15
|
+
height: 30px;
|
|
16
|
+
}
|
|
17
|
+
&.big-image {
|
|
18
|
+
width: 40px;
|
|
19
|
+
height: 40px;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
10
22
|
`;
|
|
11
23
|
export const Slider = styled.div`
|
|
12
24
|
font-family: sans-serif;
|
|
13
25
|
margin: auto;
|
|
14
26
|
background: #281f33;
|
|
15
27
|
border-radius: 6px;
|
|
16
|
-
|
|
28
|
+
width: 310px !important;
|
|
17
29
|
padding: 16px;
|
|
18
30
|
padding-top: 20px;
|
|
19
31
|
box-sizing: border-box;
|
|
20
32
|
position: absolute;
|
|
21
|
-
|
|
22
|
-
|
|
33
|
+
cursor: default;
|
|
34
|
+
z-index: 2;
|
|
35
|
+
&.top-slide {
|
|
36
|
+
top: calc(300% - 100px);
|
|
37
|
+
left: calc(580px / 2);
|
|
38
|
+
}
|
|
39
|
+
&.bottom-slide {
|
|
40
|
+
top: calc(100%);
|
|
41
|
+
left: calc(-280px / 2);
|
|
42
|
+
}
|
|
23
43
|
#div-slider {
|
|
24
44
|
width: 310px;
|
|
25
45
|
}
|
|
@@ -35,6 +55,22 @@ export const Slider = styled.div`
|
|
|
35
55
|
width: 100%;
|
|
36
56
|
height: 270px;
|
|
37
57
|
margin: 0;
|
|
58
|
+
span {
|
|
59
|
+
font-family: "Avenir Next";
|
|
60
|
+
font-style: normal;
|
|
61
|
+
font-weight: 700;
|
|
62
|
+
font-size: 15px;
|
|
63
|
+
line-height: 15px;
|
|
64
|
+
text-align: center;
|
|
65
|
+
letter-spacing: -0.015em;
|
|
66
|
+
color: #fafafa;
|
|
67
|
+
display: flex;
|
|
68
|
+
justify-content: center;
|
|
69
|
+
background-color: #281f33;
|
|
70
|
+
& + * {
|
|
71
|
+
margin-top: 10px;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
38
74
|
li {
|
|
39
75
|
position: absolute;
|
|
40
76
|
left: 0px;
|
|
@@ -71,15 +107,16 @@ export const Slider = styled.div`
|
|
|
71
107
|
display: flex;
|
|
72
108
|
justify-content: center;
|
|
73
109
|
flex-direction: column;
|
|
110
|
+
align-items: center;
|
|
74
111
|
img {
|
|
75
|
-
|
|
112
|
+
width: 90%;
|
|
76
113
|
}
|
|
77
114
|
& + * {
|
|
78
115
|
margin-top: 13px;
|
|
79
116
|
}
|
|
80
117
|
}
|
|
81
118
|
}
|
|
82
|
-
|
|
119
|
+
.end-div {
|
|
83
120
|
div {
|
|
84
121
|
height: 130px;
|
|
85
122
|
width: 100%;
|
|
@@ -96,21 +133,11 @@ export const Slider = styled.div`
|
|
|
96
133
|
.lema-end {
|
|
97
134
|
justify-content: center;
|
|
98
135
|
justify-content: space-evenly;
|
|
99
|
-
height:
|
|
136
|
+
height: 110px;
|
|
100
137
|
background-color: #281f33;
|
|
101
138
|
flex-direction: column;
|
|
102
139
|
justify-content: space-evenly;
|
|
103
140
|
border-radius: inherit;
|
|
104
|
-
span {
|
|
105
|
-
font-family: "Avenir Next";
|
|
106
|
-
font-style: normal;
|
|
107
|
-
font-weight: 700;
|
|
108
|
-
font-size: 17px;
|
|
109
|
-
line-height: 15px;
|
|
110
|
-
text-align: center;
|
|
111
|
-
letter-spacing: -0.015em;
|
|
112
|
-
color: #fafafa;
|
|
113
|
-
}
|
|
114
141
|
}
|
|
115
142
|
button {
|
|
116
143
|
display: none;
|
|
@@ -131,17 +158,16 @@ export const Slider = styled.div`
|
|
|
131
158
|
letter-spacing: -0.015em;
|
|
132
159
|
position: absolute;
|
|
133
160
|
left: 22%;
|
|
134
|
-
top:
|
|
161
|
+
top: 90%;
|
|
135
162
|
cursor: pointer;
|
|
136
163
|
}
|
|
137
164
|
}
|
|
138
165
|
}
|
|
139
|
-
|
|
140
166
|
li:first-child {
|
|
141
|
-
opacity: 1;
|
|
167
|
+
opacity: 1;
|
|
142
168
|
}
|
|
143
169
|
li:target {
|
|
144
|
-
opacity: 1;
|
|
170
|
+
opacity: 1;
|
|
145
171
|
}
|
|
146
172
|
.menu {
|
|
147
173
|
margin: 0;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { VerticalSideMenuMainPage } from "./index";
|
|
2
|
+
import iconProduct from "../../../assets/images/verticalSideMenuMainPage/iconProduct.svg";
|
|
3
|
+
import iconGroup from "../../../assets/images/verticalSideMenuMainPage/iconGroup.svg";
|
|
4
|
+
import iconLogo from "../../../assets/images/verticalSideMenuMainPage/iconLogo.svg";
|
|
5
|
+
import iconSpeedometer from "../../../assets/images/verticalSideMenuMainPage/iconSpeedometer.svg";
|
|
6
|
+
import iconTask from "../../../assets/images/verticalSideMenuMainPage/iconTask.svg";
|
|
2
7
|
|
|
3
8
|
export default {
|
|
4
9
|
title: "Components/atoms/VerticalSideMenuMainPage",
|
|
@@ -9,4 +14,22 @@ const Template = (args) => <VerticalSideMenuMainPage {...args} />;
|
|
|
9
14
|
|
|
10
15
|
export const VerticalSideMenuMainPageDefault = Template.bind({});
|
|
11
16
|
|
|
12
|
-
VerticalSideMenuMainPageDefault.args = {
|
|
17
|
+
VerticalSideMenuMainPageDefault.args = {
|
|
18
|
+
menuoption: [
|
|
19
|
+
{ icon: iconSpeedometer, path: "/Dashboard", title: "Dashborad" },
|
|
20
|
+
{
|
|
21
|
+
icon: iconProduct,
|
|
22
|
+
path: "/products",
|
|
23
|
+
title: "Productos",
|
|
24
|
+
suboption: [{ path: "/Dashboard", title: "General" },{ path: "/AddProducts", title: "Agregar Producto" }],
|
|
25
|
+
},
|
|
26
|
+
{ icon: iconGroup, path: "/providers", title: "Proovedores" },
|
|
27
|
+
{
|
|
28
|
+
icon: iconLogo,
|
|
29
|
+
path: "/ContentohProducts",
|
|
30
|
+
title: "Content Oh!",
|
|
31
|
+
suboption: { path: "/ContentohProducts", title: "Productos" },
|
|
32
|
+
},
|
|
33
|
+
{ icon: iconTask, path: "/tasks/7", title: "Tareas Lista" },
|
|
34
|
+
],
|
|
35
|
+
};
|
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
import { Container } from "./styles";
|
|
2
2
|
import iconLogoContentoh from "../../../assets/images/verticalSideMenuMainPage/iconLogoContentoh.svg";
|
|
3
|
-
import iconProduct from "../../../assets/images/verticalSideMenuMainPage/iconProduct.svg";
|
|
4
|
-
import iconGroup from "../../../assets/images/verticalSideMenuMainPage/iconGroup.svg";
|
|
5
3
|
import iconLogo from "../../../assets/images/verticalSideMenuMainPage/iconLogo.svg";
|
|
6
|
-
import iconSpeedometer from "../../../assets/images/verticalSideMenuMainPage/iconSpeedometer.svg";
|
|
7
|
-
import iconTask from "../../../assets/images/verticalSideMenuMainPage/iconTask.svg";
|
|
8
4
|
import openMenu from "../../../assets/images/verticalSideMenuMainPage/openMenu.svg";
|
|
9
|
-
import
|
|
5
|
+
import closeMenu from "../../../assets/images/verticalSideMenuMainPage/closeMenu.svg";
|
|
6
|
+
import React, { useState } from "react";
|
|
10
7
|
|
|
11
|
-
export const VerticalSideMenuMainPage = () => {
|
|
12
|
-
const [trueBar, setTrueBar] = useState(
|
|
13
|
-
const active = () => {
|
|
14
|
-
//document.getElementById("slidea1").style.border= "1px solid rgb(227, 58, 169)";
|
|
15
|
-
};
|
|
8
|
+
export const VerticalSideMenuMainPage = ({ menuoption }) => {
|
|
9
|
+
const [trueBar, setTrueBar] = useState("");
|
|
16
10
|
return (
|
|
17
|
-
<Container bar={trueBar}>
|
|
11
|
+
<Container className={trueBar} bar={trueBar}>
|
|
18
12
|
<div className="navbar-top">
|
|
19
13
|
<img
|
|
20
14
|
src={trueBar ? iconLogoContentoh : iconLogo}
|
|
@@ -22,30 +16,47 @@ export const VerticalSideMenuMainPage = () => {
|
|
|
22
16
|
className="logo"
|
|
23
17
|
></img>
|
|
24
18
|
<div className="option">
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
19
|
+
{menuoption.map((item, index) => (
|
|
20
|
+
<>
|
|
21
|
+
<div
|
|
22
|
+
className="option-link"
|
|
23
|
+
exact
|
|
24
|
+
activeClassName="active"
|
|
25
|
+
to={menuoption[index].path}
|
|
26
|
+
>
|
|
27
|
+
<img
|
|
28
|
+
src={menuoption[index].icon}
|
|
29
|
+
alt={menuoption[index].title}
|
|
30
|
+
width={"25px"}
|
|
31
|
+
></img>
|
|
32
|
+
{trueBar && <p>{menuoption[index].title}</p>}
|
|
33
|
+
</div>
|
|
34
|
+
<div className="sub-option">
|
|
35
|
+
{menuoption[index].title !== "Productos" ? (
|
|
36
|
+
""
|
|
37
|
+
) : (
|
|
38
|
+
<>
|
|
39
|
+
<div exact activeClassName="active" to="/Dashboard">
|
|
40
|
+
{trueBar && <p>General</p>}
|
|
41
|
+
</div>
|
|
42
|
+
<div exact activeClassName="active" to="/AddProducts">
|
|
43
|
+
{trueBar && <p>Agregar Producto</p>}
|
|
44
|
+
</div>
|
|
45
|
+
</>
|
|
46
|
+
)}
|
|
47
|
+
</div>
|
|
48
|
+
</>
|
|
49
|
+
))}
|
|
40
50
|
</div>
|
|
41
51
|
</div>
|
|
42
|
-
<div>
|
|
52
|
+
<div className="menu-bottom">
|
|
43
53
|
<img
|
|
44
|
-
src={openMenu}
|
|
54
|
+
src={trueBar ? closeMenu : openMenu}
|
|
45
55
|
alt="Open Menu"
|
|
46
56
|
onClick={() => {
|
|
47
|
-
|
|
48
|
-
|
|
57
|
+
{
|
|
58
|
+
trueBar ? setTrueBar("") : setTrueBar("active");
|
|
59
|
+
}
|
|
49
60
|
}}
|
|
50
61
|
></img>
|
|
51
62
|
</div>
|