contentoh-components-library 21.1.22 → 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 +88 -81
- package/dist/components/pages/ProviderProductEdition/index.js +61 -33
- package/dist/components/pages/RetailerProductEdition/index.js +11 -16
- 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 +98 -82
- package/src/components/pages/ProviderProductEdition/index.js +40 -17
- package/src/components/pages/RetailerProductEdition/index.js +9 -17
- 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
|
@@ -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>
|
|
@@ -2,44 +2,96 @@ import styled from "styled-components";
|
|
|
2
2
|
|
|
3
3
|
export const Container = styled.div`
|
|
4
4
|
height: 100%;
|
|
5
|
-
width:
|
|
5
|
+
width: 58px;
|
|
6
6
|
box-sizing: border-box;
|
|
7
7
|
padding: 23px 10px 70px 10px;
|
|
8
8
|
flex-direction: column;
|
|
9
9
|
justify-content: space-between;
|
|
10
10
|
overflow: auto;
|
|
11
|
-
border-radius:
|
|
11
|
+
border-radius: 50px;
|
|
12
12
|
background: linear-gradient(180deg, #e33aa9 0%, #3b1366 100%);
|
|
13
13
|
scrollbar-width: none;
|
|
14
14
|
display: flex;
|
|
15
15
|
text-align: center;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
&.active {
|
|
17
|
+
width: 200px;
|
|
18
|
+
padding: 23px 10px 15px 10px;
|
|
19
|
+
border-radius: 20px;
|
|
19
20
|
}
|
|
20
21
|
.navbar-top {
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
.logo {
|
|
23
|
+
& + * {
|
|
24
|
+
margin-top: ${({ bar }) => (bar === "" ? 345 : 50)}%;
|
|
25
|
+
}
|
|
23
26
|
}
|
|
24
27
|
.option {
|
|
25
|
-
|
|
28
|
+
a {
|
|
29
|
+
cursor: pointer;
|
|
26
30
|
height: 38px;
|
|
27
31
|
display: flex;
|
|
28
32
|
justify-content: center;
|
|
29
|
-
border-radius: 100
|
|
30
|
-
|
|
33
|
+
border-radius: ${({ bar }) => (bar ? 18 : 100)}px;
|
|
34
|
+
align-items: center;
|
|
35
|
+
font-family: "Raleway";
|
|
36
|
+
font-style: normal;
|
|
37
|
+
font-weight: 400;
|
|
38
|
+
font-size: 18px;
|
|
39
|
+
line-height: 21px;
|
|
40
|
+
letter-spacing: -0.015em;
|
|
41
|
+
color: #fafafa;
|
|
42
|
+
text-decoration: none;
|
|
43
|
+
&.option-link {
|
|
31
44
|
margin-top: 12px;
|
|
32
45
|
}
|
|
46
|
+
img {
|
|
47
|
+
& + * {
|
|
48
|
+
margin-left: 12px;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
&:hover {
|
|
52
|
+
background: #e33aa9;
|
|
53
|
+
}
|
|
33
54
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
55
|
+
.sub-option {
|
|
56
|
+
display: flex;
|
|
57
|
+
flex-direction: column;
|
|
58
|
+
padding-left: ${({ bar }) => (bar ? 40 : 18)}px;
|
|
59
|
+
a {
|
|
60
|
+
display: flex;
|
|
61
|
+
justify-content: flex-start;
|
|
62
|
+
text-decoration: none;
|
|
63
|
+
position: relative;
|
|
64
|
+
font-size: 13px;
|
|
65
|
+
border-left: 1px solid #f0eef2;
|
|
66
|
+
border-radius: 0;
|
|
67
|
+
color: #f0eef2;
|
|
68
|
+
padding-top: 20px;
|
|
69
|
+
padding-left: 12px;
|
|
70
|
+
height: 25px;
|
|
71
|
+
&::before {
|
|
72
|
+
border-left: 1px solid #e33aa9;
|
|
73
|
+
width: 10px;
|
|
74
|
+
content: "";
|
|
75
|
+
border-radius: 50%;
|
|
76
|
+
height: 10px;
|
|
77
|
+
background-color: white;
|
|
78
|
+
position: absolute;
|
|
79
|
+
left: ${({ bar }) => (bar ? -4 : -35)}%;
|
|
80
|
+
bottom: 1%;
|
|
81
|
+
}
|
|
82
|
+
&:hover {
|
|
83
|
+
background-color: transparent;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
& + * {
|
|
87
|
+
margin-top: 12px;
|
|
88
|
+
}
|
|
42
89
|
}
|
|
43
90
|
}
|
|
44
91
|
}
|
|
92
|
+
.menu-bottom {
|
|
93
|
+
display: flex;
|
|
94
|
+
justify-content: ${({ bar }) => (bar ? "flex-end" : "center")};
|
|
95
|
+
cursor: pointer;
|
|
96
|
+
}
|
|
45
97
|
`;
|