contentoh-components-library 21.1.27 → 21.1.30
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 +45 -48
- package/dist/components/atoms/VerticalSideMenuMainPage/styles.js +30 -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 +29 -1
- package/dist/components/pages/ProviderProductEdition/index.js +106 -12
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +56 -65
- package/dist/components/pages/RetailerProductEdition/index.js +118 -8
- package/dist/global-files/global-styles.css +0 -1
- package/dist/index.js +38 -51
- 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 +51 -22
- package/src/components/atoms/ValidationPanel/index.js +1 -1
- package/src/components/atoms/VerticalSideMenuMainPage/VerticalSideMenuMainPage.stories.js +24 -1
- package/src/components/atoms/VerticalSideMenuMainPage/index.js +37 -30
- package/src/components/atoms/VerticalSideMenuMainPage/styles.js +76 -18
- package/src/components/molecules/AvatarAndValidation/index.js +1 -1
- package/src/components/molecules/StatusAsignationInfo/index.js +31 -0
- package/src/components/organisms/FullProductNameHeader/index.js +1 -1
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +1 -1
- package/src/components/pages/ProviderProductEdition/index.js +113 -12
- package/src/components/pages/ProviderProductEdition/styles.js +1 -1
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +57 -68
- package/src/components/pages/RetailerProductEdition/index.js +103 -2
- package/src/index.js +0 -1
- 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,45 @@ 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
|
+
& + * {
|
|
9
|
+
margin-left: 10px;
|
|
10
|
+
}
|
|
11
|
+
img {
|
|
12
|
+
&.small-image {
|
|
13
|
+
width: 20px;
|
|
14
|
+
height: 20px;
|
|
15
|
+
}
|
|
16
|
+
&.medium-image {
|
|
17
|
+
width: 30px;
|
|
18
|
+
height: 30px;
|
|
19
|
+
}
|
|
20
|
+
&.big-image {
|
|
21
|
+
width: 40px;
|
|
22
|
+
height: 40px;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
10
25
|
`;
|
|
11
26
|
export const Slider = styled.div`
|
|
12
27
|
font-family: sans-serif;
|
|
13
28
|
margin: auto;
|
|
14
29
|
background: #281f33;
|
|
15
30
|
border-radius: 6px;
|
|
16
|
-
|
|
31
|
+
width: 310px;
|
|
17
32
|
padding: 16px;
|
|
18
33
|
padding-top: 20px;
|
|
19
34
|
box-sizing: border-box;
|
|
20
35
|
position: absolute;
|
|
21
|
-
|
|
22
|
-
|
|
36
|
+
cursor: default;
|
|
37
|
+
z-index: 2;
|
|
38
|
+
&.top-slide {
|
|
39
|
+
top: calc(100% - 370px);
|
|
40
|
+
left: calc(100% - 738px);
|
|
41
|
+
}
|
|
42
|
+
&.bottom-slide {
|
|
43
|
+
top: calc(100%);
|
|
44
|
+
left: calc(-280px / 2);
|
|
45
|
+
}
|
|
23
46
|
#div-slider {
|
|
24
47
|
width: 310px;
|
|
25
48
|
}
|
|
@@ -35,6 +58,22 @@ export const Slider = styled.div`
|
|
|
35
58
|
width: 100%;
|
|
36
59
|
height: 270px;
|
|
37
60
|
margin: 0;
|
|
61
|
+
span {
|
|
62
|
+
font-family: "Avenir Next";
|
|
63
|
+
font-style: normal;
|
|
64
|
+
font-weight: 500;
|
|
65
|
+
font-size: 15px;
|
|
66
|
+
line-height: 15px;
|
|
67
|
+
text-align: center;
|
|
68
|
+
letter-spacing: -0.015em;
|
|
69
|
+
color: #fafafa;
|
|
70
|
+
display: flex;
|
|
71
|
+
justify-content: center;
|
|
72
|
+
background-color: #281f33;
|
|
73
|
+
& + * {
|
|
74
|
+
margin-top: 10px;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
38
77
|
li {
|
|
39
78
|
position: absolute;
|
|
40
79
|
left: 0px;
|
|
@@ -71,15 +110,16 @@ export const Slider = styled.div`
|
|
|
71
110
|
display: flex;
|
|
72
111
|
justify-content: center;
|
|
73
112
|
flex-direction: column;
|
|
113
|
+
align-items: center;
|
|
74
114
|
img {
|
|
75
|
-
|
|
115
|
+
width: 90%;
|
|
76
116
|
}
|
|
77
117
|
& + * {
|
|
78
118
|
margin-top: 13px;
|
|
79
119
|
}
|
|
80
120
|
}
|
|
81
121
|
}
|
|
82
|
-
|
|
122
|
+
.end-div {
|
|
83
123
|
div {
|
|
84
124
|
height: 130px;
|
|
85
125
|
width: 100%;
|
|
@@ -96,21 +136,11 @@ export const Slider = styled.div`
|
|
|
96
136
|
.lema-end {
|
|
97
137
|
justify-content: center;
|
|
98
138
|
justify-content: space-evenly;
|
|
99
|
-
height:
|
|
139
|
+
height: 110px;
|
|
100
140
|
background-color: #281f33;
|
|
101
141
|
flex-direction: column;
|
|
102
142
|
justify-content: space-evenly;
|
|
103
143
|
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
144
|
}
|
|
115
145
|
button {
|
|
116
146
|
display: none;
|
|
@@ -131,17 +161,16 @@ export const Slider = styled.div`
|
|
|
131
161
|
letter-spacing: -0.015em;
|
|
132
162
|
position: absolute;
|
|
133
163
|
left: 22%;
|
|
134
|
-
top:
|
|
164
|
+
top: 90%;
|
|
135
165
|
cursor: pointer;
|
|
136
166
|
}
|
|
137
167
|
}
|
|
138
168
|
}
|
|
139
|
-
|
|
140
169
|
li:first-child {
|
|
141
|
-
opacity: 1;
|
|
170
|
+
opacity: 1;
|
|
142
171
|
}
|
|
143
172
|
li:target {
|
|
144
|
-
opacity: 1;
|
|
173
|
+
opacity: 1;
|
|
145
174
|
}
|
|
146
175
|
.menu {
|
|
147
176
|
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" },
|
|
34
|
+
],
|
|
35
|
+
};
|
|
@@ -1,20 +1,15 @@
|
|
|
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
|
-
|
|
14
|
-
//document.getElementById("slidea1").style.border= "1px solid rgb(227, 58, 169)";
|
|
15
|
-
};
|
|
8
|
+
export const VerticalSideMenuMainPage = ({ menuoption }) => {
|
|
9
|
+
const [trueBar, setTrueBar] = useState("");
|
|
10
|
+
let sub;
|
|
16
11
|
return (
|
|
17
|
-
<Container bar={trueBar}>
|
|
12
|
+
<Container className={trueBar} bar={trueBar}>
|
|
18
13
|
<div className="navbar-top">
|
|
19
14
|
<img
|
|
20
15
|
src={trueBar ? iconLogoContentoh : iconLogo}
|
|
@@ -22,30 +17,42 @@ export const VerticalSideMenuMainPage = () => {
|
|
|
22
17
|
className="logo"
|
|
23
18
|
></img>
|
|
24
19
|
<div className="option">
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
20
|
+
{menuoption.map((item) => (
|
|
21
|
+
<>
|
|
22
|
+
<div
|
|
23
|
+
className="option-link"
|
|
24
|
+
exact
|
|
25
|
+
activeClassName="active"
|
|
26
|
+
to={item.path}
|
|
27
|
+
>
|
|
28
|
+
<img src={item.icon} alt={item.title} width={"25px"}></img>
|
|
29
|
+
{trueBar && <p>{item.title}</p>}
|
|
30
|
+
</div>
|
|
31
|
+
{item.suboption === undefined ? (
|
|
32
|
+
""
|
|
33
|
+
) : (
|
|
34
|
+
<>
|
|
35
|
+
{menuoption[1].suboption.map((subitem) => (
|
|
36
|
+
<div className="sub-option">
|
|
37
|
+
<div exact activeClassName="active" to={subitem.path}>
|
|
38
|
+
{trueBar && <p>{subitem.title}</p>}
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
))}
|
|
42
|
+
</>
|
|
43
|
+
)}
|
|
44
|
+
</>
|
|
45
|
+
))}
|
|
40
46
|
</div>
|
|
41
47
|
</div>
|
|
42
|
-
<div>
|
|
48
|
+
<div className="menu-bottom">
|
|
43
49
|
<img
|
|
44
|
-
src={openMenu}
|
|
50
|
+
src={trueBar ? closeMenu : openMenu}
|
|
45
51
|
alt="Open Menu"
|
|
46
52
|
onClick={() => {
|
|
47
|
-
|
|
48
|
-
|
|
53
|
+
{
|
|
54
|
+
trueBar ? setTrueBar("") : setTrueBar("actived");
|
|
55
|
+
}
|
|
49
56
|
}}
|
|
50
57
|
></img>
|
|
51
58
|
</div>
|