best-react-pagination 0.0.3 → 0.1.0

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.
Files changed (40) hide show
  1. package/.eslintignore +1 -1
  2. package/LICENCE +12 -12
  3. package/demo/public/index.html +17 -17
  4. package/demo/src/App.tsx +10 -1
  5. package/demo/src/Pagination/components/Item/Item.tsx +19 -0
  6. package/demo/src/Pagination/components/Item/index.ts +1 -0
  7. package/demo/src/Pagination/components/ItemList/ItemList.tsx +17 -0
  8. package/demo/src/Pagination/components/ItemList/index.ts +1 -0
  9. package/demo/src/Pagination/components/Wrapper/Wrapper.tsx +17 -0
  10. package/demo/src/Pagination/components/Wrapper/index.ts +1 -0
  11. package/demo/src/Pagination/components/constants.ts +49 -0
  12. package/demo/src/Pagination/components/index.ts +3 -0
  13. package/demo/src/Pagination/components/utils.ts +3 -0
  14. package/demo/src/Pagination/index.tsx +259 -237
  15. package/demo/tsconfig.json +17 -17
  16. package/dist/components/Item/Item.d.ts +10 -0
  17. package/dist/components/Item/index.d.ts +1 -0
  18. package/dist/components/ItemList/ItemList.d.ts +7 -0
  19. package/dist/components/ItemList/index.d.ts +1 -0
  20. package/dist/components/Wrapper/Wrapper.d.ts +7 -0
  21. package/dist/components/Wrapper/index.d.ts +1 -0
  22. package/dist/components/constants.d.ts +9 -0
  23. package/dist/components/index.d.ts +3 -0
  24. package/dist/components/utils.d.ts +1 -0
  25. package/dist/index.d.ts +2 -2
  26. package/dist/index.js +1 -1
  27. package/husky.config.js +4 -4
  28. package/lib/components/Item/Item.tsx +19 -0
  29. package/lib/components/Item/index.ts +1 -0
  30. package/lib/components/ItemList/ItemList.tsx +17 -0
  31. package/lib/components/ItemList/index.ts +1 -0
  32. package/lib/components/Wrapper/Wrapper.tsx +17 -0
  33. package/lib/components/Wrapper/index.ts +1 -0
  34. package/lib/components/constants.ts +49 -0
  35. package/lib/components/index.ts +3 -0
  36. package/lib/components/utils.ts +3 -0
  37. package/lib/index.tsx +259 -237
  38. package/package.json +5 -3
  39. package/tsconfig.json +24 -23
  40. package/webpack.config.ts +53 -45
@@ -1,6 +1,9 @@
1
1
  import React, { FC } from "react";
2
+ import { defaultStylesEnum } from "./components/constants";
3
+ import { Item, ItemList, Wrapper } from "./components";
4
+ import { range } from "./components/utils";
2
5
 
3
- interface IPagination {
6
+ interface PaginationProps {
4
7
  paginationStart: 0 | 1;
5
8
  currentIndex: number;
6
9
  totalPages: number;
@@ -16,7 +19,7 @@ interface IPagination {
16
19
  className?: string;
17
20
  }
18
21
 
19
- const Pagination: FC<IPagination> = ({
22
+ const Pagination: FC<PaginationProps> = ({
20
23
  paginationStart,
21
24
  currentIndex,
22
25
  totalPages,
@@ -30,304 +33,323 @@ const Pagination: FC<IPagination> = ({
30
33
  disableItemClass = "",
31
34
  className,
32
35
  }) => {
33
- console.log(totalPages, currentIndex);
34
- const countItems = [1, 2, 3, 4];
35
-
36
- enum defaultStylesEnum {
37
- wrapperClass = "wrapperClass",
38
- itemListClass = "itemListClass",
39
- itemClass = "itemClass",
40
- selectedItemClass = "selectedItemClass",
41
- disableItemClass = "disableItemClass",
42
- }
43
-
44
- const defaultStyles: Record<defaultStylesEnum, React.CSSProperties> = {
45
- wrapperClass: {
46
- position: "sticky",
47
- display: "flex",
48
- justifyContent: "center",
49
- alignItems: "center",
50
- width: "100%",
51
- bottom: 0,
52
- },
53
- itemListClass: {
54
- padding: "10px 0",
55
- },
56
- itemClass: {
57
- display: "inline",
58
- cursor: "pointer",
59
- padding: "6px 12px",
60
- borderRadius: "4px",
61
- margin: "0 2px",
62
- backgroundColor: "#45c954",
63
- userSelect: "none",
64
- },
65
- selectedItemClass: {
66
- display: "inline",
67
- cursor: "pointer",
68
- padding: "6px 12px",
69
- borderRadius: "4px",
70
- margin: "0 2px",
71
- backgroundColor: "#48bbff",
72
- userSelect: "none",
73
- },
74
- disableItemClass: {
75
- display: "inline",
76
- cursor: "not-allowed",
77
- padding: "6px 12px",
78
- borderRadius: "4px",
79
- margin: "0 2px",
80
- userSelect: "none",
81
- },
82
- };
83
-
84
36
  if (totalPages <= 1) {
85
37
  return (
86
- <div className={wrapperClass} style={isDefaultStyles ? defaultStyles.wrapperClass : undefined}>
87
- <ul className={itemListClass} style={isDefaultStyles ? defaultStyles.itemListClass : undefined}>
88
- <li className={disableItemClass} style={isDefaultStyles ? defaultStyles.itemClass : undefined}>{`<<`}</li>
89
- <li className={disableItemClass} style={isDefaultStyles ? defaultStyles.itemClass : undefined}>{`>>`}</li>
90
- </ul>
91
- </div>
38
+ <Wrapper wrapperClass={className ? className : wrapperClass} isDefaultStyles={isDefaultStyles}>
39
+ <ItemList itemListClass={itemListClass} isDefaultStyles={isDefaultStyles}>
40
+ <Item
41
+ itemClass={disableItemClass}
42
+ itemStyle={defaultStylesEnum.disableItemClass}
43
+ isDefaultStyles={isDefaultStyles}
44
+ >
45
+ {`<<`}
46
+ </Item>
47
+
48
+ <Item
49
+ itemClass={disableItemClass}
50
+ itemStyle={defaultStylesEnum.disableItemClass}
51
+ isDefaultStyles={isDefaultStyles}
52
+ >
53
+ 1
54
+ </Item>
55
+
56
+ <Item
57
+ itemClass={disableItemClass}
58
+ itemStyle={defaultStylesEnum.disableItemClass}
59
+ isDefaultStyles={isDefaultStyles}
60
+ >
61
+ {`>>`}
62
+ </Item>
63
+ </ItemList>
64
+ </Wrapper>
92
65
  );
93
66
  }
94
67
 
95
68
  if (totalPages > 1 && totalPages < 4) {
96
69
  return (
97
- <div className={wrapperClass} style={isDefaultStyles ? defaultStyles.wrapperClass : undefined}>
98
- <ul className={itemListClass} style={isDefaultStyles ? defaultStyles.itemListClass : undefined}>
99
- {[1, 2, 3].map((el) => {
100
- const index = paginationStart === 0 ? el - 1 : el;
70
+ <Wrapper wrapperClass={className ? className : wrapperClass} isDefaultStyles={isDefaultStyles}>
71
+ <ItemList itemListClass={itemListClass} isDefaultStyles={isDefaultStyles}>
72
+ {range(totalPages).map((el) => {
73
+ const index = paginationStart === 0 ? el : el + 1;
101
74
  if (currentIndex === index) {
102
75
  return (
103
- <li
104
- className={selectedItemClass}
105
- style={isDefaultStyles ? defaultStyles.selectedItemClass : undefined}
76
+ <Item
77
+ itemClass={selectedItemClass}
78
+ itemStyle={defaultStylesEnum.selectedItemClass}
79
+ isDefaultStyles={isDefaultStyles}
106
80
  key={el}
107
81
  >
108
- {el}
109
- </li>
82
+ {el + 1}
83
+ </Item>
110
84
  );
111
85
  }
112
86
  return (
113
- <li
114
- className={selectedItemClass}
115
- style={isDefaultStyles ? defaultStyles.itemClass : undefined}
116
- key={el}
87
+ <Item
88
+ itemClass={selectedItemClass}
89
+ itemStyle={defaultStylesEnum.itemClass}
90
+ isDefaultStyles={isDefaultStyles}
117
91
  onClick={() => setIndex(index)}
92
+ key={el}
118
93
  >
119
- {el}
120
- </li>
94
+ {el + 1}
95
+ </Item>
121
96
  );
122
97
  })}
123
- </ul>
124
- </div>
98
+ </ItemList>
99
+ </Wrapper>
125
100
  );
126
101
  }
127
102
 
128
103
  if (totalPages === 4) {
129
104
  return (
130
- <div className={wrapperClass} style={isDefaultStyles ? defaultStyles.wrapperClass : undefined}>
131
- <ul className={itemListClass} style={isDefaultStyles ? defaultStyles.itemListClass : undefined}>
105
+ <Wrapper wrapperClass={className ? className : wrapperClass} isDefaultStyles={isDefaultStyles}>
106
+ <ItemList itemListClass={itemListClass} isDefaultStyles={isDefaultStyles}>
132
107
  {currentIndex > (paginationStart === 0 ? 0 : 1) ? (
133
- <li
134
- className={itemClass}
135
- style={isDefaultStyles ? defaultStyles.itemClass : undefined}
108
+ <Item
109
+ itemClass={itemClass}
110
+ itemStyle={defaultStylesEnum.itemClass}
111
+ isDefaultStyles={isDefaultStyles}
136
112
  onClick={() => setIndex(currentIndex - 1)}
137
- >{`<<`}</li>
113
+ >
114
+ {`<<`}
115
+ </Item>
138
116
  ) : (
139
- <li
140
- className={disableItemClass}
141
- style={isDefaultStyles ? defaultStyles.disableItemClass : undefined}
142
- >{`<<`}</li>
117
+ <Item
118
+ itemClass={disableItemClass}
119
+ itemStyle={defaultStylesEnum.disableItemClass}
120
+ isDefaultStyles={isDefaultStyles}
121
+ >
122
+ {`<<`}
123
+ </Item>
143
124
  )}
144
- {countItems.map((el) => {
145
- const index = paginationStart === 0 ? el - 1 : el;
125
+ {range(totalPages).map((el) => {
126
+ const index = paginationStart === 0 ? el : el + 1;
146
127
  if (currentIndex === index) {
147
128
  return (
148
- <li
149
- className={selectedItemClass}
150
- style={isDefaultStyles ? defaultStyles.selectedItemClass : undefined}
129
+ <Item
130
+ itemClass={selectedItemClass}
131
+ itemStyle={defaultStylesEnum.selectedItemClass}
132
+ isDefaultStyles={isDefaultStyles}
151
133
  key={el}
152
134
  >
153
- {el}
154
- </li>
135
+ {el + 1}
136
+ </Item>
155
137
  );
156
138
  }
157
139
  return (
158
- <li
159
- className={selectedItemClass}
160
- style={isDefaultStyles ? defaultStyles.itemClass : undefined}
140
+ <Item
141
+ itemClass={selectedItemClass}
142
+ itemStyle={defaultStylesEnum.itemClass}
143
+ isDefaultStyles={isDefaultStyles}
161
144
  key={el}
162
145
  onClick={() => setIndex(index)}
163
146
  >
164
- {el}
165
- </li>
147
+ {el + 1}
148
+ </Item>
166
149
  );
167
150
  })}
168
151
  {currentIndex < (paginationStart === 0 ? 3 : 4) ? (
169
- <li
170
- className={itemClass}
171
- style={isDefaultStyles ? defaultStyles.itemClass : undefined}
152
+ <Item
153
+ itemClass={itemClass}
154
+ itemStyle={defaultStylesEnum.itemClass}
155
+ isDefaultStyles={isDefaultStyles}
172
156
  onClick={() => setIndex(currentIndex + 1)}
173
- >{`>>`}</li>
157
+ >
158
+ {`>>`}
159
+ </Item>
174
160
  ) : (
175
- <li
176
- className={disableItemClass}
177
- style={isDefaultStyles ? defaultStyles.disableItemClass : undefined}
178
- >{`>>`}</li>
161
+ <Item
162
+ itemClass={disableItemClass}
163
+ itemStyle={defaultStylesEnum.disableItemClass}
164
+ isDefaultStyles={isDefaultStyles}
165
+ >
166
+ {`>>`}
167
+ </Item>
179
168
  )}
180
- </ul>
181
- </div>
169
+ </ItemList>
170
+ </Wrapper>
182
171
  );
183
172
  }
184
173
 
185
174
  return (
186
- <>
187
- <div className={wrapperClass && className} style={isDefaultStyles ? defaultStyles.wrapperClass : undefined}>
188
- <ul className={itemListClass} style={isDefaultStyles ? defaultStyles.itemListClass : undefined}>
189
- {/*Previous button*/}
190
- {currentIndex > (paginationStart === 0 ? 0 : 1) ? (
191
- <li
192
- style={isDefaultStyles ? defaultStyles.itemClass : undefined}
193
- onClick={() => setIndex(currentIndex - 1)}
194
- >{`<<`}</li>
195
- ) : (
196
- <li
197
- className={disableItemClass}
198
- style={isDefaultStyles ? defaultStyles.disableItemClass : undefined}
199
- >{`<<`}</li>
200
- )}
201
- {/*First page button*/}
202
- {currentIndex > (paginationStart == 0 ? 2 : 3) ? (
203
- <li
204
- className={itemClass}
205
- style={isDefaultStyles ? defaultStyles.itemClass : undefined}
206
- onClick={() => setIndex(paginationStart === 0 ? 0 : 1)}
207
- >{`1`}</li>
208
- ) : null}
175
+ <Wrapper wrapperClass={className ? className : wrapperClass} isDefaultStyles={isDefaultStyles}>
176
+ <ItemList itemListClass={itemListClass} isDefaultStyles={isDefaultStyles}>
177
+ {/*Previous button*/}
178
+ {currentIndex > (paginationStart === 0 ? 0 : 1) ? (
179
+ <Item
180
+ itemClass={itemClass}
181
+ itemStyle={defaultStylesEnum.itemClass}
182
+ isDefaultStyles={isDefaultStyles}
183
+ onClick={() => setIndex(currentIndex - 1)}
184
+ >
185
+ {`<<`}
186
+ </Item>
187
+ ) : (
188
+ <Item
189
+ itemClass={disableItemClass}
190
+ itemStyle={defaultStylesEnum.disableItemClass}
191
+ isDefaultStyles={isDefaultStyles}
192
+ >
193
+ {`<<`}
194
+ </Item>
195
+ )}
196
+ {/*First page button*/}
197
+ {currentIndex > (paginationStart == 0 ? 2 : 3) ? (
198
+ <Item
199
+ itemClass={itemClass}
200
+ itemStyle={defaultStylesEnum.itemClass}
201
+ isDefaultStyles={isDefaultStyles}
202
+ onClick={() => setIndex(paginationStart === 0 ? 0 : 1)}
203
+ >
204
+ {`1`}
205
+ </Item>
206
+ ) : null}
209
207
 
210
- {currentIndex < (paginationStart === 0 ? 3 : 4)
211
- ? countItems.map((el) => {
212
- if (paginationStart === 0 ? currentIndex + 1 === el : currentIndex === el) {
213
- return (
214
- <li
215
- className={selectedItemClass}
216
- style={isDefaultStyles ? defaultStyles.selectedItemClass : undefined}
217
- key={el}
218
- >
219
- {el}
220
- </li>
221
- );
222
- }
208
+ {currentIndex < (paginationStart === 0 ? 3 : 4)
209
+ ? range(4).map((el) => {
210
+ const index = paginationStart === 0 ? el : el + 1;
211
+ if (currentIndex === index) {
223
212
  return (
224
- <li
225
- className={itemClass}
226
- style={isDefaultStyles ? defaultStyles.itemClass : undefined}
227
- onClick={() => setIndex(paginationStart === 0 ? el - 1 : el)}
213
+ <Item
214
+ itemClass={selectedItemClass}
215
+ itemStyle={defaultStylesEnum.selectedItemClass}
216
+ isDefaultStyles={isDefaultStyles}
228
217
  key={el}
229
218
  >
230
- {el}
231
- </li>
219
+ {el + 1}
220
+ </Item>
232
221
  );
233
- })
234
- : null}
222
+ }
223
+ return (
224
+ <Item
225
+ itemClass={itemClass}
226
+ itemStyle={defaultStylesEnum.itemClass}
227
+ isDefaultStyles={isDefaultStyles}
228
+ onClick={() => setIndex(index)}
229
+ key={el}
230
+ >
231
+ {el + 1}
232
+ </Item>
233
+ );
234
+ })
235
+ : null}
235
236
 
236
- {currentIndex > (paginationStart === 0 ? 2 : 3) ? (
237
- <li
238
- className={disableItemClass}
239
- style={isDefaultStyles ? defaultStyles.disableItemClass : undefined}
240
- >{`...`}</li>
241
- ) : null}
237
+ {currentIndex > (paginationStart === 0 ? 2 : 3) ? (
238
+ <Item
239
+ itemClass={disableItemClass}
240
+ itemStyle={defaultStylesEnum.disableItemClass}
241
+ isDefaultStyles={isDefaultStyles}
242
+ >
243
+ {`...`}
244
+ </Item>
245
+ ) : null}
242
246
 
243
- {currentIndex > (paginationStart === 0 ? 2 : 3) &&
244
- (paginationStart === 0 ? currentIndex : currentIndex - 1) < totalPages ? (
245
- <>
246
- {currentIndex === (paginationStart === 0 ? totalPages - 2 : totalPages - 1) && (
247
- <li
248
- className={itemClass}
249
- style={isDefaultStyles ? defaultStyles.itemClass : undefined}
247
+ {currentIndex > (paginationStart === 0 ? 2 : 3) &&
248
+ (paginationStart === 0 ? currentIndex : currentIndex - 1) < totalPages ? (
249
+ <>
250
+ {currentIndex === (paginationStart === 0 ? totalPages - 2 : totalPages - 1) && (
251
+ <Item
252
+ itemClass={itemClass}
253
+ itemStyle={defaultStylesEnum.itemClass}
254
+ isDefaultStyles={isDefaultStyles}
255
+ onClick={() => setIndex(paginationStart === 0 ? totalPages - 4 : totalPages - 3)}
256
+ >
257
+ {totalPages - 3}
258
+ </Item>
259
+ )}
260
+
261
+ {currentIndex === (paginationStart === 0 ? totalPages - 1 : totalPages) && (
262
+ <>
263
+ <Item
264
+ itemClass={itemClass}
265
+ itemStyle={defaultStylesEnum.itemClass}
266
+ isDefaultStyles={isDefaultStyles}
250
267
  onClick={() => setIndex(paginationStart === 0 ? totalPages - 4 : totalPages - 3)}
251
268
  >
252
269
  {totalPages - 3}
253
- </li>
254
- )}
255
-
256
- {currentIndex === (paginationStart === 0 ? totalPages - 1 : totalPages) && (
257
- <>
258
- <li
259
- className={itemClass}
260
- style={isDefaultStyles ? defaultStyles.itemClass : undefined}
261
- onClick={() => setIndex(paginationStart === 0 ? totalPages - 4 : totalPages - 3)}
262
- >
263
- {totalPages - 3}
264
- </li>
265
- <li
266
- className={itemClass}
267
- style={isDefaultStyles ? defaultStyles.itemClass : undefined}
268
- onClick={() => setIndex(paginationStart === 0 ? totalPages - 3 : totalPages - 2)}
269
- >
270
- {totalPages - 2}
271
- </li>
272
- </>
273
- )}
270
+ </Item>
271
+ <Item
272
+ itemClass={itemClass}
273
+ itemStyle={defaultStylesEnum.itemClass}
274
+ isDefaultStyles={isDefaultStyles}
275
+ onClick={() => setIndex(paginationStart === 0 ? totalPages - 3 : totalPages - 2)}
276
+ >
277
+ {totalPages - 2}
278
+ </Item>
279
+ </>
280
+ )}
274
281
 
275
- <li
276
- className={itemClass}
277
- style={isDefaultStyles ? defaultStyles.itemClass : undefined}
278
- onClick={() => setIndex(currentIndex - 1)}
279
- >
280
- {paginationStart === 0 ? currentIndex : currentIndex - 1}
281
- </li>
282
+ <Item
283
+ itemClass={itemClass}
284
+ itemStyle={defaultStylesEnum.itemClass}
285
+ isDefaultStyles={isDefaultStyles}
286
+ onClick={() => setIndex(currentIndex - 1)}
287
+ >
288
+ {paginationStart === 0 ? currentIndex : currentIndex - 1}
289
+ </Item>
282
290
 
283
- <li className={selectedItemClass} style={isDefaultStyles ? defaultStyles.selectedItemClass : undefined}>
284
- {paginationStart === 0 ? currentIndex + 1 : currentIndex}
285
- </li>
291
+ <Item
292
+ itemClass={selectedItemClass}
293
+ itemStyle={defaultStylesEnum.selectedItemClass}
294
+ isDefaultStyles={isDefaultStyles}
295
+ >
296
+ {paginationStart === 0 ? currentIndex + 1 : currentIndex}
297
+ </Item>
286
298
 
287
- {currentIndex < (paginationStart === 0 ? totalPages - 1 : totalPages) ? (
288
- <li
289
- className={itemClass}
290
- style={isDefaultStyles ? defaultStyles.itemClass : undefined}
291
- onClick={() => setIndex(currentIndex + 1)}
292
- >
293
- {paginationStart === 0 ? currentIndex + 2 : currentIndex + 1}
294
- </li>
295
- ) : null}
296
- </>
297
- ) : null}
299
+ {currentIndex < (paginationStart === 0 ? totalPages - 1 : totalPages) ? (
300
+ <Item
301
+ itemClass={itemClass}
302
+ itemStyle={defaultStylesEnum.itemClass}
303
+ isDefaultStyles={isDefaultStyles}
304
+ onClick={() => setIndex(currentIndex + 1)}
305
+ >
306
+ {paginationStart === 0 ? currentIndex + 2 : currentIndex + 1}
307
+ </Item>
308
+ ) : null}
309
+ </>
310
+ ) : null}
298
311
 
299
- {currentIndex < (paginationStart === 0 ? totalPages - 3 : totalPages - 2) ? (
300
- <li
301
- className={disableItemClass}
302
- style={isDefaultStyles ? defaultStyles.disableItemClass : undefined}
303
- >{`...`}</li>
304
- ) : null}
312
+ {currentIndex < (paginationStart === 0 ? totalPages - 3 : totalPages - 2) ? (
313
+ <Item
314
+ itemClass={disableItemClass}
315
+ itemStyle={defaultStylesEnum.disableItemClass}
316
+ isDefaultStyles={isDefaultStyles}
317
+ >
318
+ {`...`}
319
+ </Item>
320
+ ) : null}
305
321
 
306
- {currentIndex < (paginationStart === 0 ? totalPages - 2 : totalPages - 1) ? (
307
- <li
308
- className={itemClass}
309
- style={isDefaultStyles ? defaultStyles.itemClass : undefined}
310
- onClick={() => setIndex(paginationStart === 0 ? totalPages - 1 : totalPages)}
311
- >
312
- {totalPages}
313
- </li>
314
- ) : null}
322
+ {currentIndex < (paginationStart === 0 ? totalPages - 2 : totalPages - 1) ? (
323
+ <Item
324
+ itemClass={itemClass}
325
+ itemStyle={defaultStylesEnum.itemClass}
326
+ isDefaultStyles={isDefaultStyles}
327
+ onClick={() => setIndex(paginationStart === 0 ? totalPages - 1 : totalPages)}
328
+ >
329
+ {totalPages}
330
+ </Item>
331
+ ) : null}
315
332
 
316
- {(paginationStart === 0 ? currentIndex + 1 : currentIndex) < totalPages ? (
317
- <li
318
- className={itemClass}
319
- style={isDefaultStyles ? defaultStyles.itemClass : undefined}
320
- onClick={() => setIndex(currentIndex + 1)}
321
- >{`>>`}</li>
322
- ) : (
323
- <li
324
- className={disableItemClass}
325
- style={isDefaultStyles ? defaultStyles.disableItemClass : undefined}
326
- >{`>>`}</li>
327
- )}
328
- </ul>
329
- </div>
330
- </>
333
+ {(paginationStart === 0 ? currentIndex + 1 : currentIndex) < totalPages ? (
334
+ <Item
335
+ itemClass={itemClass}
336
+ itemStyle={defaultStylesEnum.itemClass}
337
+ isDefaultStyles={isDefaultStyles}
338
+ onClick={() => setIndex(currentIndex + 1)}
339
+ >
340
+ {`>>`}
341
+ </Item>
342
+ ) : (
343
+ <Item
344
+ itemClass={disableItemClass}
345
+ itemStyle={defaultStylesEnum.disableItemClass}
346
+ isDefaultStyles={isDefaultStyles}
347
+ >
348
+ {`>>`}
349
+ </Item>
350
+ )}
351
+ </ItemList>
352
+ </Wrapper>
331
353
  );
332
354
  };
333
355
 
@@ -1,18 +1,18 @@
1
1
  {
2
- "compilerOptions": {
3
- "outDir": "./dist/",
4
- "sourceMap": true,
5
- "strict": true,
6
- "noImplicitReturns": true,
7
- "noImplicitAny": true,
8
- "module": "es6",
9
- "moduleResolution": "node",
10
- "target": "es5",
11
- "allowJs": true,
12
- "jsx": "react",
13
- "allowSyntheticDefaultImports": true
14
- },
15
- "include": [
16
- "./src/**/*"
17
- ]
18
- }
2
+ "compilerOptions": {
3
+ "sourceMap": true,
4
+ "strict": true,
5
+ "noImplicitReturns": true,
6
+ "noImplicitAny": true,
7
+ "module": "es6",
8
+ "moduleResolution": "node",
9
+ "target": "es5",
10
+ "allowJs": true,
11
+ "jsx": "react",
12
+ "allowSyntheticDefaultImports": true,
13
+ "downlevelIteration": true
14
+ },
15
+ "include": [
16
+ "./src/**/*"
17
+ ]
18
+ }
@@ -0,0 +1,10 @@
1
+ import { FC } from "react";
2
+ import { defaultStylesEnum } from "../constants";
3
+ interface ItemProps {
4
+ isDefaultStyles: boolean | undefined;
5
+ itemClass: string;
6
+ itemStyle: defaultStylesEnum;
7
+ onClick?: () => void;
8
+ }
9
+ declare const Item: FC<ItemProps>;
10
+ export default Item;
@@ -0,0 +1 @@
1
+ export { default } from "./Item";
@@ -0,0 +1,7 @@
1
+ import { FC } from "react";
2
+ interface ItemListProps {
3
+ isDefaultStyles: boolean | undefined;
4
+ itemListClass: string;
5
+ }
6
+ declare const ItemList: FC<ItemListProps>;
7
+ export default ItemList;
@@ -0,0 +1 @@
1
+ export { default } from "./ItemList";
@@ -0,0 +1,7 @@
1
+ import { FC } from "react";
2
+ interface WrapperProps {
3
+ isDefaultStyles: boolean | undefined;
4
+ wrapperClass: string;
5
+ }
6
+ declare const Wrapper: FC<WrapperProps>;
7
+ export default Wrapper;
@@ -0,0 +1 @@
1
+ export { default } from "./Wrapper";