l-min-components 1.6.1235 → 1.6.1237
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
|
@@ -20,105 +20,108 @@ import styled from "styled-components";
|
|
|
20
20
|
*
|
|
21
21
|
*/
|
|
22
22
|
const ButtonComponent = (props) => {
|
|
23
|
-
|
|
24
|
-
const handleClick = useCallback(
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
// Fix: Add props.onClick to the dependency array
|
|
24
|
+
const handleClick = useCallback(
|
|
25
|
+
(e) => {
|
|
26
|
+
props.onClick && props.onClick(e);
|
|
27
|
+
},
|
|
28
|
+
[props.onClick]
|
|
29
|
+
); // Dependency array now includes props.onClick
|
|
27
30
|
// //console.log(props);
|
|
28
31
|
switch (props.type) {
|
|
29
32
|
case "primary":
|
|
30
33
|
return (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
<Button
|
|
35
|
+
disabled={props.disabled}
|
|
36
|
+
onClick={handleClick}
|
|
37
|
+
style={props.styles}>
|
|
38
|
+
{props.icon?.left && props.icon.jsx ? (
|
|
39
|
+
<props.icon.jsx
|
|
40
|
+
{...{
|
|
41
|
+
width: props.icon.width,
|
|
42
|
+
height: props.icon.height,
|
|
43
|
+
stroke: props.icon.stroke,
|
|
44
|
+
}}
|
|
45
|
+
/>
|
|
46
|
+
) : (
|
|
47
|
+
props.icon?.left && (
|
|
48
|
+
<TestIcon
|
|
37
49
|
{...{
|
|
38
50
|
width: props.icon.width,
|
|
39
51
|
height: props.icon.height,
|
|
40
52
|
stroke: props.icon.stroke,
|
|
41
53
|
}}
|
|
42
54
|
/>
|
|
43
|
-
)
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
<
|
|
55
|
+
)
|
|
56
|
+
)}
|
|
57
|
+
{props.text ?? "Text"}
|
|
58
|
+
{props.icon?.right && props.icon.jsx ? (
|
|
59
|
+
<props.icon.jsx
|
|
60
|
+
{...{
|
|
61
|
+
width: props.icon.width,
|
|
62
|
+
height: props.icon.height,
|
|
63
|
+
stroke: props.icon.stroke,
|
|
64
|
+
}}
|
|
65
|
+
/>
|
|
66
|
+
) : (
|
|
67
|
+
props.icon?.right && (
|
|
68
|
+
<TestIcon
|
|
57
69
|
{...{
|
|
58
70
|
width: props.icon.width,
|
|
59
71
|
height: props.icon.height,
|
|
60
72
|
stroke: props.icon.stroke,
|
|
61
73
|
}}
|
|
62
74
|
/>
|
|
63
|
-
)
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
width: props.icon.width,
|
|
68
|
-
height: props.icon.height,
|
|
69
|
-
stroke: props.icon.stroke,
|
|
70
|
-
}}
|
|
71
|
-
/>
|
|
72
|
-
)
|
|
73
|
-
)}
|
|
74
|
-
</Button>
|
|
75
|
-
)
|
|
75
|
+
)
|
|
76
|
+
)}
|
|
77
|
+
</Button>
|
|
78
|
+
);
|
|
76
79
|
case "secondary":
|
|
77
80
|
return (
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
<SecondaryButton
|
|
82
|
+
disabled={props.disabled}
|
|
83
|
+
onClick={handleClick}
|
|
84
|
+
style={props.styles}>
|
|
85
|
+
{props.icon?.left && props.icon.jsx ? (
|
|
86
|
+
<props.icon.jsx
|
|
87
|
+
{...{
|
|
88
|
+
width: props.icon.width,
|
|
89
|
+
height: props.icon.height,
|
|
90
|
+
stroke: props.icon.stroke,
|
|
91
|
+
}}
|
|
92
|
+
/>
|
|
93
|
+
) : (
|
|
94
|
+
props.icon?.left && (
|
|
95
|
+
<TestIcon
|
|
84
96
|
{...{
|
|
85
97
|
width: props.icon.width,
|
|
86
98
|
height: props.icon.height,
|
|
87
99
|
stroke: props.icon.stroke,
|
|
88
100
|
}}
|
|
89
101
|
/>
|
|
90
|
-
)
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
<
|
|
102
|
+
)
|
|
103
|
+
)}
|
|
104
|
+
{props.text ?? "Text"}
|
|
105
|
+
{props.icon?.right && props.icon.jsx ? (
|
|
106
|
+
<props.icon.jsx
|
|
107
|
+
{...{
|
|
108
|
+
width: props.icon.width,
|
|
109
|
+
height: props.icon.height,
|
|
110
|
+
stroke: props.icon.stroke,
|
|
111
|
+
}}
|
|
112
|
+
/>
|
|
113
|
+
) : (
|
|
114
|
+
props.icon?.right && (
|
|
115
|
+
<TestIcon
|
|
104
116
|
{...{
|
|
105
117
|
width: props.icon.width,
|
|
106
118
|
height: props.icon.height,
|
|
107
119
|
stroke: props.icon.stroke,
|
|
108
120
|
}}
|
|
109
121
|
/>
|
|
110
|
-
)
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
{...{
|
|
114
|
-
width: props.icon.width,
|
|
115
|
-
height: props.icon.height,
|
|
116
|
-
stroke: props.icon.stroke,
|
|
117
|
-
}}
|
|
118
|
-
/>
|
|
119
|
-
)
|
|
120
|
-
)}
|
|
121
|
-
</SecondaryButton>
|
|
122
|
+
)
|
|
123
|
+
)}
|
|
124
|
+
</SecondaryButton>
|
|
122
125
|
);
|
|
123
126
|
case "tertiary":
|
|
124
127
|
return (
|
|
@@ -169,50 +172,50 @@ const ButtonComponent = (props) => {
|
|
|
169
172
|
);
|
|
170
173
|
default:
|
|
171
174
|
return (
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
175
|
+
<Button
|
|
176
|
+
disabled={props.disabled}
|
|
177
|
+
onClick={handleClick}
|
|
178
|
+
style={props.styles}>
|
|
179
|
+
{props.icon?.left && props.icon.jsx ? (
|
|
180
|
+
<props.icon.jsx
|
|
181
|
+
{...{
|
|
182
|
+
width: props.icon.width,
|
|
183
|
+
height: props.icon.height,
|
|
184
|
+
stroke: props.icon.stroke,
|
|
185
|
+
}}
|
|
186
|
+
/>
|
|
187
|
+
) : (
|
|
188
|
+
props.icon?.left && (
|
|
189
|
+
<TestIcon
|
|
178
190
|
{...{
|
|
179
191
|
width: props.icon.width,
|
|
180
192
|
height: props.icon.height,
|
|
181
193
|
stroke: props.icon.stroke,
|
|
182
194
|
}}
|
|
183
195
|
/>
|
|
184
|
-
)
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
<
|
|
196
|
+
)
|
|
197
|
+
)}
|
|
198
|
+
{props.text ?? "Text"}
|
|
199
|
+
{props.icon?.right && props.icon.jsx ? (
|
|
200
|
+
<props.icon.jsx
|
|
201
|
+
{...{
|
|
202
|
+
width: props.icon.width,
|
|
203
|
+
height: props.icon.height,
|
|
204
|
+
stroke: props.icon.stroke,
|
|
205
|
+
}}
|
|
206
|
+
/>
|
|
207
|
+
) : (
|
|
208
|
+
props.icon?.right && (
|
|
209
|
+
<TestIcon
|
|
198
210
|
{...{
|
|
199
211
|
width: props.icon.width,
|
|
200
212
|
height: props.icon.height,
|
|
201
213
|
stroke: props.icon.stroke,
|
|
202
214
|
}}
|
|
203
215
|
/>
|
|
204
|
-
)
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
{...{
|
|
208
|
-
width: props.icon.width,
|
|
209
|
-
height: props.icon.height,
|
|
210
|
-
stroke: props.icon.stroke,
|
|
211
|
-
}}
|
|
212
|
-
/>
|
|
213
|
-
)
|
|
214
|
-
)}
|
|
215
|
-
</Button>
|
|
216
|
+
)
|
|
217
|
+
)}
|
|
218
|
+
</Button>
|
|
216
219
|
);
|
|
217
220
|
}
|
|
218
221
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
2
|
|
|
3
3
|
export const MessagesWrapper = styled.div`
|
|
4
|
-
position: fixed;
|
|
4
|
+
/* position: fixed; */
|
|
5
5
|
width: 570px;
|
|
6
6
|
/* height: 300px; */
|
|
7
7
|
/* height: 40vh; */
|
|
8
|
-
bottom: 0;
|
|
9
|
-
right: 0;
|
|
8
|
+
/* bottom: 0; */
|
|
9
|
+
/* right: 0; */
|
|
10
10
|
border-radius: 30px;
|
|
11
11
|
background-color: rgba(0, 194, 194, 1);
|
|
12
|
-
z-index: 99;
|
|
12
|
+
/* z-index: 99; */
|
|
13
13
|
|
|
14
14
|
.message_by_wrapper {
|
|
15
15
|
border-radius: ${({ isFullHeight }) =>
|