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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "l-min-components",
3
- "version": "1.6.1235",
3
+ "version": "1.6.1237",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src/assets",
@@ -20,105 +20,108 @@ import styled from "styled-components";
20
20
  *
21
21
  */
22
22
  const ButtonComponent = (props) => {
23
-
24
- const handleClick = useCallback((e) => {
25
- props.onClick && props.onClick(e);
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
- <Button
32
- disabled={props.disabled}
33
- onClick={handleClick}
34
- style={props.styles}>
35
- {props.icon?.left && props.icon.jsx ? (
36
- <props.icon.jsx
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
- props.icon?.left && (
45
- <TestIcon
46
- {...{
47
- width: props.icon.width,
48
- height: props.icon.height,
49
- stroke: props.icon.stroke,
50
- }}
51
- />
52
- )
53
- )}
54
- {props.text ?? "Text"}
55
- {props.icon?.right && props.icon.jsx ? (
56
- <props.icon.jsx
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
- props.icon?.right && (
65
- <TestIcon
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
- <SecondaryButton
79
- disabled={props.disabled}
80
- onClick={handleClick}
81
- style={props.styles}>
82
- {props.icon?.left && props.icon.jsx ? (
83
- <props.icon.jsx
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
- props.icon?.left && (
92
- <TestIcon
93
- {...{
94
- width: props.icon.width,
95
- height: props.icon.height,
96
- stroke: props.icon.stroke,
97
- }}
98
- />
99
- )
100
- )}
101
- {props.text ?? "Text"}
102
- {props.icon?.right && props.icon.jsx ? (
103
- <props.icon.jsx
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
- props.icon?.right && (
112
- <TestIcon
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
- <Button
173
- disabled={props.disabled}
174
- onClick={handleClick}
175
- style={props.styles}>
176
- {props.icon?.left && props.icon.jsx ? (
177
- <props.icon.jsx
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
- props.icon?.left && (
186
- <TestIcon
187
- {...{
188
- width: props.icon.width,
189
- height: props.icon.height,
190
- stroke: props.icon.stroke,
191
- }}
192
- />
193
- )
194
- )}
195
- {props.text ?? "Text"}
196
- {props.icon?.right && props.icon.jsx ? (
197
- <props.icon.jsx
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
- props.icon?.right && (
206
- <TestIcon
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 }) =>