@qoretechnologies/reqore 0.36.0 → 0.36.1
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/__tests__/collection.test.tsx +1 -22
- package/__tests__/table.test.tsx +1 -1
- package/__tests__/tree.test.tsx +0 -18
- package/dist/components/Breadcrumbs/index.js +1 -1
- package/dist/components/Breadcrumbs/index.js.map +1 -1
- package/dist/components/Button/index.d.ts +1 -4
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.js +11 -26
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Collection/index.d.ts +2 -2
- package/dist/components/Collection/index.d.ts.map +1 -1
- package/dist/components/Collection/index.js +10 -10
- package/dist/components/Collection/index.js.map +1 -1
- package/dist/components/Collection/item.d.ts +3 -3
- package/dist/components/Collection/item.d.ts.map +1 -1
- package/dist/components/Collection/item.js.map +1 -1
- package/dist/components/Columns/index.d.ts +1 -1
- package/dist/components/Columns/index.d.ts.map +1 -1
- package/dist/components/Comment/index.d.ts +1 -1
- package/dist/components/Comment/index.d.ts.map +1 -1
- package/dist/components/CommentFeed/index.d.ts +1 -1
- package/dist/components/CommentFeed/index.d.ts.map +1 -1
- package/dist/components/ControlGroup/index.d.ts +1 -1
- package/dist/components/ControlGroup/index.d.ts.map +1 -1
- package/dist/components/Dropdown/index.d.ts +1 -1
- package/dist/components/Dropdown/index.d.ts.map +1 -1
- package/dist/components/Dropdown/item.d.ts +2 -2
- package/dist/components/Dropdown/item.d.ts.map +1 -1
- package/dist/components/Dropdown/list.d.ts +1 -1
- package/dist/components/Dropdown/list.d.ts.map +1 -1
- package/dist/components/Effect/index.d.ts +2 -2
- package/dist/components/Effect/index.d.ts.map +1 -1
- package/dist/components/ExportModal/index.d.ts +11 -0
- package/dist/components/ExportModal/index.d.ts.map +1 -0
- package/dist/components/ExportModal/index.js +91 -0
- package/dist/components/ExportModal/index.js.map +1 -0
- package/dist/components/Header/index.d.ts +7 -7
- package/dist/components/Header/index.d.ts.map +1 -1
- package/dist/components/InputClearButton/index.d.ts +1 -0
- package/dist/components/InputClearButton/index.d.ts.map +1 -1
- package/dist/components/KeyValueTable/index.d.ts +4 -4
- package/dist/components/KeyValueTable/index.d.ts.map +1 -1
- package/dist/components/KeyValueTable/index.js.map +1 -1
- package/dist/components/Layout/content.d.ts +1 -1
- package/dist/components/Layout/content.d.ts.map +1 -1
- package/dist/components/Layout/index.d.ts +1 -1
- package/dist/components/Layout/index.d.ts.map +1 -1
- package/dist/components/Menu/item.d.ts +1 -1
- package/dist/components/Menu/item.d.ts.map +1 -1
- package/dist/components/Menu/item.js +3 -3
- package/dist/components/Menu/item.js.map +1 -1
- package/dist/components/Modal/index.d.ts +1 -1
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/MultiSelect/index.d.ts +2 -2
- package/dist/components/MultiSelect/index.d.ts.map +1 -1
- package/dist/components/Notifications/notification.js +3 -3
- package/dist/components/Notifications/notification.js.map +1 -1
- package/dist/components/Paging/index.d.ts +1 -1
- package/dist/components/Paging/index.d.ts.map +1 -1
- package/dist/components/Panel/NonResponsiveActions.d.ts +1 -1
- package/dist/components/Panel/NonResponsiveActions.d.ts.map +1 -1
- package/dist/components/Panel/index.js +1 -1
- package/dist/components/Panel/index.js.map +1 -1
- package/dist/components/Panel/panel.screenshot.d.ts +1 -1
- package/dist/components/Panel/panel.screenshot.d.ts.map +1 -1
- package/dist/components/Paragraph/index.d.ts +1 -1
- package/dist/components/Paragraph/index.d.ts.map +1 -1
- package/dist/components/Popover/index.d.ts +1 -1
- package/dist/components/Popover/index.d.ts.map +1 -1
- package/dist/components/RadioGroup/index.d.ts +1 -1
- package/dist/components/RadioGroup/index.d.ts.map +1 -1
- package/dist/components/Sidebar/item.d.ts +1 -1
- package/dist/components/Sidebar/item.d.ts.map +1 -1
- package/dist/components/Spacer/index.d.ts +3 -3
- package/dist/components/Spacer/index.d.ts.map +1 -1
- package/dist/components/Spinner/index.d.ts +1 -1
- package/dist/components/Spinner/index.d.ts.map +1 -1
- package/dist/components/Table/body.d.ts +1 -1
- package/dist/components/Table/body.d.ts.map +1 -1
- package/dist/components/Table/body.js +4 -2
- package/dist/components/Table/body.js.map +1 -1
- package/dist/components/Table/cell.d.ts +1 -1
- package/dist/components/Table/cell.d.ts.map +1 -1
- package/dist/components/Table/headerCell.d.ts +1 -1
- package/dist/components/Table/headerCell.d.ts.map +1 -1
- package/dist/components/Table/helpers.d.ts +8 -6
- package/dist/components/Table/helpers.d.ts.map +1 -1
- package/dist/components/Table/helpers.js +49 -16
- package/dist/components/Table/helpers.js.map +1 -1
- package/dist/components/Table/index.d.ts +5 -4
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js +45 -38
- package/dist/components/Table/index.js.map +1 -1
- package/dist/components/Table/row.d.ts +7 -5
- package/dist/components/Table/row.d.ts.map +1 -1
- package/dist/components/Table/row.js +3 -2
- package/dist/components/Table/row.js.map +1 -1
- package/dist/components/Table/value.d.ts +1 -1
- package/dist/components/Table/value.d.ts.map +1 -1
- package/dist/components/Tabs/content.d.ts +1 -1
- package/dist/components/Tabs/content.d.ts.map +1 -1
- package/dist/components/Tabs/index.d.ts +1 -1
- package/dist/components/Tabs/index.d.ts.map +1 -1
- package/dist/components/Tabs/list.d.ts +1 -1
- package/dist/components/Tabs/list.d.ts.map +1 -1
- package/dist/components/Tabs/list.js +1 -1
- package/dist/components/Tabs/list.js.map +1 -1
- package/dist/components/Tag/group.d.ts +1 -1
- package/dist/components/Tag/group.d.ts.map +1 -1
- package/dist/components/Tree/index.d.ts +2 -1
- package/dist/components/Tree/index.d.ts.map +1 -1
- package/dist/components/Tree/index.js +35 -31
- package/dist/components/Tree/index.js.map +1 -1
- package/dist/containers/Paging.d.ts +1 -1
- package/dist/containers/Paging.d.ts.map +1 -1
- package/dist/containers/ThemeProvider.d.ts +1 -1
- package/dist/containers/ThemeProvider.d.ts.map +1 -1
- package/dist/helpers/utils.d.ts +2 -1
- package/dist/helpers/utils.d.ts.map +1 -1
- package/dist/helpers/utils.js +20 -2
- package/dist/helpers/utils.js.map +1 -1
- package/dist/hooks/useAutoFocus.d.ts +1 -1
- package/dist/hooks/useAutoFocus.d.ts.map +1 -1
- package/dist/hooks/usePopover.d.ts +1 -0
- package/dist/hooks/usePopover.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/styles.d.ts +3 -0
- package/dist/styles.d.ts.map +1 -1
- package/dist/styles.js +49 -11
- package/dist/styles.js.map +1 -1
- package/migration-storybook.log +88 -0
- package/package.json +26 -20
- package/src/components/Breadcrumbs/index.tsx +1 -1
- package/src/components/Button/index.tsx +3 -54
- package/src/components/Collection/index.tsx +18 -15
- package/src/components/Collection/item.tsx +2 -1
- package/src/components/ExportModal/index.tsx +98 -0
- package/src/components/KeyValueTable/index.tsx +17 -11
- package/src/components/Menu/item.tsx +4 -4
- package/src/components/Notifications/notification.tsx +2 -2
- package/src/components/Panel/index.tsx +2 -2
- package/src/components/Table/body.tsx +6 -3
- package/src/components/Table/helpers.ts +52 -21
- package/src/components/Table/index.tsx +108 -75
- package/src/components/Table/row.tsx +12 -7
- package/src/components/Tabs/list.tsx +1 -1
- package/src/components/Tree/index.tsx +82 -75
- package/src/helpers/utils.ts +10 -2
- package/src/hooks/useAutoFocus.ts +1 -1
- package/src/index.tsx +1 -1
- package/src/mock/tableData.ts +12 -0
- package/src/stories/Breadcrumbs/Breadcrumbs.stories.tsx +11 -23
- package/src/stories/Button/Button.stories.tsx +83 -47
- package/src/stories/Checkbox/Checkbox.stories.tsx +19 -9
- package/src/stories/Collection/Collection.stories.tsx +195 -171
- package/src/stories/Columns/Columns.stories.tsx +38 -24
- package/src/stories/Comment/Comment.stories.tsx +15 -6
- package/src/stories/ControlGroup/ControlGroup.stories.tsx +102 -48
- package/src/stories/Drawer/Drawer.stories.tsx +52 -17
- package/src/stories/Dropdown/Dropdown.stories.tsx +184 -152
- package/src/stories/ExportModal/ExportModal.stories.tsx +18 -0
- package/src/stories/Header/Header.stories.tsx +65 -31
- package/src/stories/Icon/Icon.stories.tsx +139 -133
- package/src/stories/Input/Input.stories.tsx +68 -31
- package/src/stories/KeyValueTable/KeyValueTable.stories.tsx +143 -118
- package/src/stories/Menu/Menu.stories.tsx +56 -20
- package/src/stories/Message/Message.stories.tsx +71 -37
- package/src/stories/Modal/Modal.stories.tsx +28 -8
- package/src/stories/MultiSelect/MultiSelect.stories.tsx +66 -35
- package/src/stories/Navbar/Navbar.stories.tsx +15 -5
- package/src/stories/Notifications/Interactive.stories.tsx +40 -28
- package/src/stories/Notifications/Notification.stories.tsx +55 -41
- package/src/stories/Notifications/Notifications.stories.tsx +45 -29
- package/src/stories/Paging/Paging.stories.tsx +206 -177
- package/src/stories/Panel/Panel.stories.tsx +238 -168
- package/src/stories/Paragraph/Paragraph.stories.tsx +66 -31
- package/src/stories/Popover/Popover.stories.tsx +62 -40
- package/src/stories/RadioGroup/RadioGroup.stories.tsx +41 -19
- package/src/stories/Sidebar/Sidebar.stories.tsx +29 -10
- package/src/stories/Spacer/Spacer.stories.tsx +13 -5
- package/src/stories/Spinner/Spinner.stories.tsx +26 -12
- package/src/stories/Table/Table.stories.tsx +200 -144
- package/src/stories/Table/Tests.stories.tsx +9 -0
- package/src/stories/Tabs/Tabs.stories.tsx +82 -46
- package/src/stories/Tag/Tag.stories.tsx +56 -37
- package/src/stories/Tag/TagGroup.stories.tsx +297 -0
- package/src/stories/TextArea/TextArea.stories.tsx +82 -40
- package/src/stories/Tree/Tree.stories.tsx +84 -22
- package/src/stories/utils.ts +22 -1
- package/src/styles.ts +55 -2
- package/tests.json +1 -1
|
@@ -1,226 +1,255 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { useMount } from 'react-use';
|
|
4
|
-
import {
|
|
5
|
-
import { IReqorePagingOptions } from '../../hooks/usePaging';
|
|
4
|
+
import { ReqorePagination } from '../../components/Paging';
|
|
6
5
|
import { ReqoreControlGroup, ReqoreTag, useReqorePaging } from '../../index';
|
|
7
|
-
import { tableData } from '../../mock/tableData';
|
|
6
|
+
import { TestTableItem, tableData } from '../../mock/tableData';
|
|
7
|
+
import { StoryMeta, StoryRenderer } from '../utils';
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
const meta = {
|
|
10
10
|
title: 'Collections/Paging/Stories',
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
NoPageButtons.args = {
|
|
41
|
-
showPages: false,
|
|
11
|
+
component: ReqorePagination,
|
|
12
|
+
} as StoryMeta<typeof ReqorePagination<TestTableItem>>;
|
|
13
|
+
|
|
14
|
+
export default meta;
|
|
15
|
+
type Story = StoryObj<typeof meta>;
|
|
16
|
+
type StoryType = typeof ReqorePagination<TestTableItem> & any;
|
|
17
|
+
|
|
18
|
+
const Template: StoryRenderer<StoryType> = (args) => {
|
|
19
|
+
const [scrollContainer, setScrollContainer] = useState<any>(undefined);
|
|
20
|
+
const paging = useReqorePaging<any>({ items: tableData, ...args.pagingOptions });
|
|
21
|
+
|
|
22
|
+
useMount(() => {
|
|
23
|
+
setScrollContainer(document.querySelector('.reqore-content')!);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<ReqoreControlGroup vertical fluid key='paging-wrapper'>
|
|
28
|
+
{paging.items.map((item) => (
|
|
29
|
+
<ReqoreTag fixed='key' labelKey={item.id} label={`${item.firstName} ${item.lastName}`} />
|
|
30
|
+
))}
|
|
31
|
+
<ReqorePagination<any>
|
|
32
|
+
{...paging}
|
|
33
|
+
{...args}
|
|
34
|
+
scrollContainer={
|
|
35
|
+
args.scrollToTopOnPageChange || !!args.changePageOnScroll ? scrollContainer : undefined
|
|
36
|
+
}
|
|
37
|
+
/>
|
|
38
|
+
</ReqoreControlGroup>
|
|
39
|
+
);
|
|
42
40
|
};
|
|
43
41
|
|
|
44
|
-
export const
|
|
45
|
-
|
|
46
|
-
showControls: false,
|
|
42
|
+
export const Basic: Story = {
|
|
43
|
+
render: Template,
|
|
47
44
|
};
|
|
48
45
|
|
|
49
|
-
export const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
46
|
+
export const NoPageButtons: Story = {
|
|
47
|
+
render: Template,
|
|
48
|
+
|
|
49
|
+
args: {
|
|
50
|
+
showPages: false,
|
|
51
|
+
},
|
|
54
52
|
};
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
53
|
+
|
|
54
|
+
export const NoControlButtons: Story = {
|
|
55
|
+
render: Template,
|
|
56
|
+
|
|
57
|
+
args: {
|
|
58
|
+
showControls: false,
|
|
59
|
+
},
|
|
61
60
|
};
|
|
62
61
|
|
|
63
|
-
export const
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
effect: {
|
|
70
|
-
gradient: {
|
|
71
|
-
colors: 'info',
|
|
72
|
-
},
|
|
62
|
+
export const ShowSomePages: Story = {
|
|
63
|
+
render: Template,
|
|
64
|
+
|
|
65
|
+
args: {
|
|
66
|
+
pagingOptions: {
|
|
67
|
+
pagesToShow: 4,
|
|
73
68
|
},
|
|
74
69
|
},
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export const AsList: Story = {
|
|
73
|
+
render: Template,
|
|
74
|
+
|
|
75
|
+
args: {
|
|
76
|
+
showPagesAs: 'list',
|
|
77
|
+
pagingOptions: {
|
|
78
|
+
pagesToShow: 5,
|
|
80
79
|
},
|
|
81
80
|
},
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export const WithStyling: Story = {
|
|
84
|
+
render: Template,
|
|
85
|
+
|
|
86
|
+
args: {
|
|
87
|
+
showPagesAs: 'buttons',
|
|
88
|
+
activePageButtonProps: {
|
|
89
|
+
effect: {
|
|
90
|
+
gradient: {
|
|
91
|
+
colors: 'info',
|
|
92
|
+
},
|
|
86
93
|
},
|
|
87
94
|
},
|
|
95
|
+
pageButtonProps: {
|
|
96
|
+
effect: {
|
|
97
|
+
gradient: {
|
|
98
|
+
colors: 'warning',
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
controlPageButtonProps: {
|
|
103
|
+
effect: {
|
|
104
|
+
gradient: {
|
|
105
|
+
colors: 'success',
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
pagingOptions: {
|
|
110
|
+
pagesToShow: 15,
|
|
111
|
+
},
|
|
88
112
|
},
|
|
89
|
-
pagingOptions: {
|
|
90
|
-
pagesToShow: 15,
|
|
91
|
-
} as IReqorePagingOptions<any>,
|
|
92
113
|
};
|
|
93
114
|
|
|
94
|
-
export const ListWithStyling: Story
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
115
|
+
export const ListWithStyling: Story = {
|
|
116
|
+
render: Template,
|
|
117
|
+
|
|
118
|
+
args: {
|
|
119
|
+
showPagesAs: 'list',
|
|
120
|
+
activePageButtonProps: {
|
|
121
|
+
effect: {
|
|
122
|
+
gradient: {
|
|
123
|
+
colors: 'info',
|
|
124
|
+
},
|
|
103
125
|
},
|
|
104
126
|
},
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
127
|
+
pageButtonProps: {
|
|
128
|
+
effect: {
|
|
129
|
+
gradient: {
|
|
130
|
+
colors: 'warning',
|
|
131
|
+
},
|
|
110
132
|
},
|
|
111
133
|
},
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
134
|
+
listPageButtonProps: {
|
|
135
|
+
isDefaultOpen: true,
|
|
136
|
+
effect: {
|
|
137
|
+
gradient: {
|
|
138
|
+
colors: 'info',
|
|
139
|
+
},
|
|
118
140
|
},
|
|
119
141
|
},
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
142
|
+
controlPageButtonProps: {
|
|
143
|
+
effect: {
|
|
144
|
+
gradient: {
|
|
145
|
+
colors: 'success',
|
|
146
|
+
},
|
|
125
147
|
},
|
|
126
148
|
},
|
|
149
|
+
pagingOptions: {
|
|
150
|
+
pagesToShow: 15,
|
|
151
|
+
},
|
|
127
152
|
},
|
|
128
|
-
pagingOptions: {
|
|
129
|
-
pagesToShow: 15,
|
|
130
|
-
} as IReqorePagingOptions<any>,
|
|
131
153
|
};
|
|
132
154
|
|
|
133
|
-
export const WithLabels: Story
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
155
|
+
export const WithLabels: Story = {
|
|
156
|
+
render: Template,
|
|
157
|
+
|
|
158
|
+
args: {
|
|
159
|
+
showPagesAs: 'list',
|
|
160
|
+
showLabels: true,
|
|
161
|
+
listPageButtonProps: {
|
|
162
|
+
isDefaultOpen: true,
|
|
163
|
+
},
|
|
164
|
+
pagingOptions: {
|
|
165
|
+
pagesToShow: 15,
|
|
166
|
+
},
|
|
141
167
|
},
|
|
142
|
-
pagingOptions: {
|
|
143
|
-
pagesToShow: 15,
|
|
144
|
-
} as IReqorePagingOptions<any>,
|
|
145
168
|
};
|
|
146
169
|
|
|
147
|
-
export const NextPageOnVerticalScroll: Story
|
|
148
|
-
|
|
149
|
-
> = Template.bind({});
|
|
150
|
-
NextPageOnVerticalScroll.args = {
|
|
151
|
-
changePageOnScroll: 'vertical',
|
|
152
|
-
};
|
|
170
|
+
export const NextPageOnVerticalScroll: Story = {
|
|
171
|
+
render: Template,
|
|
153
172
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
NextPageOnHorizontalScroll.args = {
|
|
158
|
-
changePageOnScroll: 'horizontal',
|
|
173
|
+
args: {
|
|
174
|
+
changePageOnScroll: 'vertical',
|
|
175
|
+
},
|
|
159
176
|
};
|
|
160
177
|
|
|
161
|
-
export const
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
pagesToShow: 5,
|
|
168
|
-
itemsPerPage: 100,
|
|
169
|
-
} as IReqorePagingOptions<any>,
|
|
178
|
+
export const NextPageOnHorizontalScroll: Story = {
|
|
179
|
+
render: Template,
|
|
180
|
+
|
|
181
|
+
args: {
|
|
182
|
+
changePageOnScroll: 'horizontal',
|
|
183
|
+
},
|
|
170
184
|
};
|
|
171
185
|
|
|
172
|
-
export const
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
186
|
+
export const ScrollToTop: Story = {
|
|
187
|
+
render: Template,
|
|
188
|
+
|
|
189
|
+
args: {
|
|
190
|
+
scrollToTopOnPageChange: true,
|
|
191
|
+
pagingOptions: {
|
|
192
|
+
pagesToShow: 5,
|
|
193
|
+
itemsPerPage: 100,
|
|
194
|
+
},
|
|
180
195
|
},
|
|
181
|
-
loadMoreLabel: 'Load 10 more',
|
|
182
|
-
pagingOptions: {
|
|
183
|
-
infinite: true,
|
|
184
|
-
} as IReqorePagingOptions<any>,
|
|
185
196
|
};
|
|
186
197
|
|
|
187
|
-
export const
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
198
|
+
export const Infinite: Story = {
|
|
199
|
+
render: Template,
|
|
200
|
+
|
|
201
|
+
args: {
|
|
202
|
+
showLabels: true,
|
|
203
|
+
fluid: false,
|
|
204
|
+
loadMoreButtonProps: {
|
|
205
|
+
textAlign: 'center',
|
|
206
|
+
},
|
|
207
|
+
loadMoreLabel: 'Load 10 more',
|
|
208
|
+
pagingOptions: {
|
|
209
|
+
infinite: true,
|
|
210
|
+
},
|
|
197
211
|
},
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
export const InfiniteWithAutoScroll: Story = {
|
|
215
|
+
render: Template,
|
|
216
|
+
|
|
217
|
+
args: {
|
|
218
|
+
showLabels: true,
|
|
219
|
+
fluid: true,
|
|
220
|
+
scrollOnLoadMore: true,
|
|
221
|
+
loadMoreButtonProps: {
|
|
222
|
+
textAlign: 'center',
|
|
223
|
+
size: 'big',
|
|
224
|
+
},
|
|
225
|
+
loadAllButtonProps: {
|
|
226
|
+
textAlign: 'center',
|
|
227
|
+
size: 'big',
|
|
228
|
+
},
|
|
229
|
+
loadMoreLabel: 'Load 100 more',
|
|
230
|
+
pagingOptions: {
|
|
231
|
+
infinite: true,
|
|
232
|
+
itemsPerPage: 100,
|
|
233
|
+
},
|
|
201
234
|
},
|
|
202
|
-
loadMoreLabel: 'Load 100 more',
|
|
203
|
-
pagingOptions: {
|
|
204
|
-
infinite: true,
|
|
205
|
-
itemsPerPage: 100,
|
|
206
|
-
} as IReqorePagingOptions<any>,
|
|
207
235
|
};
|
|
208
236
|
|
|
209
|
-
export const InfiniteWithAutoLoad: Story
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
237
|
+
export const InfiniteWithAutoLoad: Story = {
|
|
238
|
+
render: Template,
|
|
239
|
+
|
|
240
|
+
args: {
|
|
241
|
+
showLabels: true,
|
|
242
|
+
fluid: true,
|
|
243
|
+
autoLoadMore: true,
|
|
244
|
+
scrollOnLoadMore: true,
|
|
245
|
+
loadMoreButtonProps: {
|
|
246
|
+
textAlign: 'center',
|
|
247
|
+
icon: 'Loader5Line',
|
|
248
|
+
},
|
|
249
|
+
loadMoreLabel: 'Scroll to load 20 more',
|
|
250
|
+
pagingOptions: {
|
|
251
|
+
infinite: true,
|
|
252
|
+
itemsPerPage: 20,
|
|
253
|
+
},
|
|
220
254
|
},
|
|
221
|
-
loadMoreLabel: 'Scroll to load 20 more',
|
|
222
|
-
pagingOptions: {
|
|
223
|
-
infinite: true,
|
|
224
|
-
itemsPerPage: 20,
|
|
225
|
-
} as IReqorePagingOptions<any>,
|
|
226
255
|
};
|