@qoretechnologies/reqore 0.35.3 → 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.
Files changed (198) hide show
  1. package/__tests__/collection.test.tsx +1 -22
  2. package/__tests__/table.test.tsx +1 -1
  3. package/__tests__/tree.test.tsx +0 -18
  4. package/dist/components/Breadcrumbs/index.js +1 -1
  5. package/dist/components/Breadcrumbs/index.js.map +1 -1
  6. package/dist/components/Button/index.d.ts +1 -4
  7. package/dist/components/Button/index.d.ts.map +1 -1
  8. package/dist/components/Button/index.js +11 -26
  9. package/dist/components/Button/index.js.map +1 -1
  10. package/dist/components/Collection/index.d.ts +2 -2
  11. package/dist/components/Collection/index.d.ts.map +1 -1
  12. package/dist/components/Collection/index.js +10 -10
  13. package/dist/components/Collection/index.js.map +1 -1
  14. package/dist/components/Collection/item.d.ts +3 -3
  15. package/dist/components/Collection/item.d.ts.map +1 -1
  16. package/dist/components/Collection/item.js.map +1 -1
  17. package/dist/components/Columns/index.d.ts +1 -1
  18. package/dist/components/Columns/index.d.ts.map +1 -1
  19. package/dist/components/Comment/index.d.ts +1 -1
  20. package/dist/components/Comment/index.d.ts.map +1 -1
  21. package/dist/components/CommentFeed/index.d.ts +1 -1
  22. package/dist/components/CommentFeed/index.d.ts.map +1 -1
  23. package/dist/components/ControlGroup/index.d.ts +1 -1
  24. package/dist/components/ControlGroup/index.d.ts.map +1 -1
  25. package/dist/components/Dropdown/index.d.ts +1 -1
  26. package/dist/components/Dropdown/index.d.ts.map +1 -1
  27. package/dist/components/Dropdown/item.d.ts +2 -2
  28. package/dist/components/Dropdown/item.d.ts.map +1 -1
  29. package/dist/components/Dropdown/list.d.ts +1 -1
  30. package/dist/components/Dropdown/list.d.ts.map +1 -1
  31. package/dist/components/Effect/index.d.ts +2 -2
  32. package/dist/components/Effect/index.d.ts.map +1 -1
  33. package/dist/components/ExportModal/index.d.ts +11 -0
  34. package/dist/components/ExportModal/index.d.ts.map +1 -0
  35. package/dist/components/ExportModal/index.js +91 -0
  36. package/dist/components/ExportModal/index.js.map +1 -0
  37. package/dist/components/Header/index.d.ts +7 -7
  38. package/dist/components/Header/index.d.ts.map +1 -1
  39. package/dist/components/InputClearButton/index.d.ts +1 -0
  40. package/dist/components/InputClearButton/index.d.ts.map +1 -1
  41. package/dist/components/KeyValueTable/index.d.ts +27 -0
  42. package/dist/components/KeyValueTable/index.d.ts.map +1 -0
  43. package/dist/components/KeyValueTable/index.js +87 -0
  44. package/dist/components/KeyValueTable/index.js.map +1 -0
  45. package/dist/components/Layout/content.d.ts +1 -1
  46. package/dist/components/Layout/content.d.ts.map +1 -1
  47. package/dist/components/Layout/index.d.ts +1 -1
  48. package/dist/components/Layout/index.d.ts.map +1 -1
  49. package/dist/components/Menu/item.d.ts +1 -1
  50. package/dist/components/Menu/item.d.ts.map +1 -1
  51. package/dist/components/Menu/item.js +3 -3
  52. package/dist/components/Menu/item.js.map +1 -1
  53. package/dist/components/Modal/index.d.ts +1 -1
  54. package/dist/components/Modal/index.d.ts.map +1 -1
  55. package/dist/components/MultiSelect/index.d.ts +2 -2
  56. package/dist/components/MultiSelect/index.d.ts.map +1 -1
  57. package/dist/components/Notifications/notification.js +3 -3
  58. package/dist/components/Notifications/notification.js.map +1 -1
  59. package/dist/components/Paging/index.d.ts +1 -1
  60. package/dist/components/Paging/index.d.ts.map +1 -1
  61. package/dist/components/Panel/NonResponsiveActions.d.ts +1 -1
  62. package/dist/components/Panel/NonResponsiveActions.d.ts.map +1 -1
  63. package/dist/components/Panel/index.js +1 -1
  64. package/dist/components/Panel/index.js.map +1 -1
  65. package/dist/components/Panel/panel.screenshot.d.ts +1 -1
  66. package/dist/components/Panel/panel.screenshot.d.ts.map +1 -1
  67. package/dist/components/Paragraph/index.d.ts +1 -1
  68. package/dist/components/Paragraph/index.d.ts.map +1 -1
  69. package/dist/components/Popover/index.d.ts +1 -1
  70. package/dist/components/Popover/index.d.ts.map +1 -1
  71. package/dist/components/RadioGroup/index.d.ts +1 -1
  72. package/dist/components/RadioGroup/index.d.ts.map +1 -1
  73. package/dist/components/Sidebar/item.d.ts +1 -1
  74. package/dist/components/Sidebar/item.d.ts.map +1 -1
  75. package/dist/components/Spacer/index.d.ts +3 -3
  76. package/dist/components/Spacer/index.d.ts.map +1 -1
  77. package/dist/components/Spinner/index.d.ts +1 -1
  78. package/dist/components/Spinner/index.d.ts.map +1 -1
  79. package/dist/components/Table/body.d.ts +1 -1
  80. package/dist/components/Table/body.d.ts.map +1 -1
  81. package/dist/components/Table/body.js +4 -2
  82. package/dist/components/Table/body.js.map +1 -1
  83. package/dist/components/Table/cell.d.ts +1 -1
  84. package/dist/components/Table/cell.d.ts.map +1 -1
  85. package/dist/components/Table/headerCell.d.ts +1 -1
  86. package/dist/components/Table/headerCell.d.ts.map +1 -1
  87. package/dist/components/Table/helpers.d.ts +8 -6
  88. package/dist/components/Table/helpers.d.ts.map +1 -1
  89. package/dist/components/Table/helpers.js +49 -16
  90. package/dist/components/Table/helpers.js.map +1 -1
  91. package/dist/components/Table/index.d.ts +5 -4
  92. package/dist/components/Table/index.d.ts.map +1 -1
  93. package/dist/components/Table/index.js +63 -53
  94. package/dist/components/Table/index.js.map +1 -1
  95. package/dist/components/Table/row.d.ts +7 -5
  96. package/dist/components/Table/row.d.ts.map +1 -1
  97. package/dist/components/Table/row.js +12 -5
  98. package/dist/components/Table/row.js.map +1 -1
  99. package/dist/components/Table/value.d.ts +7 -0
  100. package/dist/components/Table/value.d.ts.map +1 -0
  101. package/dist/components/Table/value.js +37 -0
  102. package/dist/components/Table/value.js.map +1 -0
  103. package/dist/components/Tabs/content.d.ts +1 -1
  104. package/dist/components/Tabs/content.d.ts.map +1 -1
  105. package/dist/components/Tabs/index.d.ts +1 -1
  106. package/dist/components/Tabs/index.d.ts.map +1 -1
  107. package/dist/components/Tabs/list.d.ts +1 -1
  108. package/dist/components/Tabs/list.d.ts.map +1 -1
  109. package/dist/components/Tabs/list.js +1 -1
  110. package/dist/components/Tabs/list.js.map +1 -1
  111. package/dist/components/Tag/group.d.ts +1 -1
  112. package/dist/components/Tag/group.d.ts.map +1 -1
  113. package/dist/components/Tree/index.d.ts +2 -1
  114. package/dist/components/Tree/index.d.ts.map +1 -1
  115. package/dist/components/Tree/index.js +35 -31
  116. package/dist/components/Tree/index.js.map +1 -1
  117. package/dist/containers/Paging.d.ts +1 -1
  118. package/dist/containers/Paging.d.ts.map +1 -1
  119. package/dist/containers/ThemeProvider.d.ts +1 -1
  120. package/dist/containers/ThemeProvider.d.ts.map +1 -1
  121. package/dist/helpers/utils.d.ts +2 -1
  122. package/dist/helpers/utils.d.ts.map +1 -1
  123. package/dist/helpers/utils.js +20 -2
  124. package/dist/helpers/utils.js.map +1 -1
  125. package/dist/hooks/useAutoFocus.d.ts +1 -1
  126. package/dist/hooks/useAutoFocus.d.ts.map +1 -1
  127. package/dist/hooks/usePopover.d.ts +1 -0
  128. package/dist/hooks/usePopover.d.ts.map +1 -1
  129. package/dist/index.d.ts +2 -0
  130. package/dist/index.d.ts.map +1 -1
  131. package/dist/index.js +6 -2
  132. package/dist/index.js.map +1 -1
  133. package/dist/styles.d.ts +3 -0
  134. package/dist/styles.d.ts.map +1 -1
  135. package/dist/styles.js +49 -11
  136. package/dist/styles.js.map +1 -1
  137. package/migration-storybook.log +88 -0
  138. package/package.json +26 -20
  139. package/src/components/Breadcrumbs/index.tsx +1 -1
  140. package/src/components/Button/index.tsx +3 -54
  141. package/src/components/Collection/index.tsx +18 -15
  142. package/src/components/Collection/item.tsx +2 -1
  143. package/src/components/ExportModal/index.tsx +98 -0
  144. package/src/components/KeyValueTable/index.tsx +129 -0
  145. package/src/components/Menu/item.tsx +4 -4
  146. package/src/components/Notifications/notification.tsx +2 -2
  147. package/src/components/Panel/index.tsx +2 -2
  148. package/src/components/Table/body.tsx +6 -3
  149. package/src/components/Table/helpers.ts +52 -21
  150. package/src/components/Table/index.tsx +127 -90
  151. package/src/components/Table/row.tsx +21 -10
  152. package/src/components/Table/value.tsx +27 -0
  153. package/src/components/Tabs/list.tsx +1 -1
  154. package/src/components/Tree/index.tsx +82 -75
  155. package/src/helpers/utils.ts +10 -2
  156. package/src/hooks/useAutoFocus.ts +1 -1
  157. package/src/index.tsx +2 -0
  158. package/src/mock/tableData.ts +12 -0
  159. package/src/stories/Breadcrumbs/Breadcrumbs.stories.tsx +11 -23
  160. package/src/stories/Button/Button.stories.tsx +83 -47
  161. package/src/stories/Checkbox/Checkbox.stories.tsx +19 -9
  162. package/src/stories/Collection/Collection.stories.tsx +195 -171
  163. package/src/stories/Columns/Columns.stories.tsx +38 -24
  164. package/src/stories/Comment/Comment.stories.tsx +15 -6
  165. package/src/stories/ControlGroup/ControlGroup.stories.tsx +102 -48
  166. package/src/stories/Drawer/Drawer.stories.tsx +52 -17
  167. package/src/stories/Dropdown/Dropdown.stories.tsx +184 -152
  168. package/src/stories/ExportModal/ExportModal.stories.tsx +18 -0
  169. package/src/stories/Header/Header.stories.tsx +65 -31
  170. package/src/stories/Icon/Icon.stories.tsx +139 -133
  171. package/src/stories/Input/Input.stories.tsx +68 -31
  172. package/src/stories/KeyValueTable/KeyValueTable.stories.tsx +224 -0
  173. package/src/stories/Menu/Menu.stories.tsx +56 -20
  174. package/src/stories/Message/Message.stories.tsx +71 -37
  175. package/src/stories/Modal/Modal.stories.tsx +28 -8
  176. package/src/stories/MultiSelect/MultiSelect.stories.tsx +66 -35
  177. package/src/stories/Navbar/Navbar.stories.tsx +15 -5
  178. package/src/stories/Notifications/Interactive.stories.tsx +40 -28
  179. package/src/stories/Notifications/Notification.stories.tsx +55 -41
  180. package/src/stories/Notifications/Notifications.stories.tsx +45 -29
  181. package/src/stories/Paging/Paging.stories.tsx +206 -177
  182. package/src/stories/Panel/Panel.stories.tsx +238 -168
  183. package/src/stories/Paragraph/Paragraph.stories.tsx +66 -31
  184. package/src/stories/Popover/Popover.stories.tsx +62 -40
  185. package/src/stories/RadioGroup/RadioGroup.stories.tsx +41 -19
  186. package/src/stories/Sidebar/Sidebar.stories.tsx +29 -10
  187. package/src/stories/Spacer/Spacer.stories.tsx +13 -5
  188. package/src/stories/Spinner/Spinner.stories.tsx +26 -12
  189. package/src/stories/Table/Table.stories.tsx +200 -144
  190. package/src/stories/Table/Tests.stories.tsx +9 -0
  191. package/src/stories/Tabs/Tabs.stories.tsx +82 -46
  192. package/src/stories/Tag/Tag.stories.tsx +56 -37
  193. package/src/stories/Tag/TagGroup.stories.tsx +297 -0
  194. package/src/stories/TextArea/TextArea.stories.tsx +82 -40
  195. package/src/stories/Tree/Tree.stories.tsx +84 -22
  196. package/src/stories/utils.ts +22 -1
  197. package/src/styles.ts +55 -2
  198. package/tests.json +1 -1
@@ -1,4 +1,4 @@
1
- import { Meta, Story } from '@storybook/react/types-6-0';
1
+ import { StoryFn, StoryObj } from '@storybook/react';
2
2
  import { noop } from 'lodash';
3
3
  import ReqoreContent from '../../components/Content';
4
4
  import ReqoreIcon from '../../components/Icon';
@@ -14,17 +14,25 @@ import {
14
14
  ReqoreNavbarItem,
15
15
  ReqorePopover,
16
16
  } from '../../index';
17
+ import { StoryMeta } from '../utils';
17
18
  import { FlatArg, NoContentArg } from '../utils/args';
18
19
 
19
- export default {
20
+ const meta = {
20
21
  title: 'Layout/Header & Footer/Stories',
22
+ component: ReqoreHeader,
23
+ args: {
24
+ withoutContent: true,
25
+ },
21
26
  argTypes: {
22
27
  ...FlatArg,
23
28
  ...NoContentArg,
24
29
  },
25
- } as Meta<IReqoreNavbarProps>;
30
+ } as StoryMeta<typeof ReqoreHeader>;
31
+
32
+ export default meta;
33
+ type Story = StoryObj<typeof meta>;
26
34
 
27
- const Template: Story<IReqoreNavbarProps> = (args: IReqoreNavbarProps) => {
35
+ const Template: StoryFn<IReqoreNavbarProps> = (args: IReqoreNavbarProps) => {
28
36
  return (
29
37
  <>
30
38
  <ReqoreHeader {...args}>
@@ -106,4 +114,6 @@ const Template: Story<IReqoreNavbarProps> = (args: IReqoreNavbarProps) => {
106
114
  );
107
115
  };
108
116
 
109
- export const Basic = Template.bind({});
117
+ export const Basic: Story = {
118
+ render: Template,
119
+ };
@@ -1,14 +1,15 @@
1
- import { Meta, Story } from '@storybook/react/types-6-0';
2
- import ReqoreNotification, {
3
- IReqoreNotificationProps,
4
- } from '../../components/Notifications/notification';
5
- import { IReqoreUIProviderProps } from '../../containers/UIProvider';
1
+ import { StoryObj } from '@storybook/react';
2
+ import ReqoreNotification from '../../components/Notifications/notification';
6
3
  import { ReqoreUIProvider, useReqoreProperty } from '../../index';
4
+ import { StoryMeta, StoryRenderer } from '../utils';
7
5
 
8
- export default {
6
+ const meta = {
9
7
  title: 'Other/Notifications/Interactive/Stories',
10
8
  component: ReqoreNotification,
11
- } as Meta;
9
+ } as StoryMeta<typeof ReqoreNotification>;
10
+
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
12
13
 
13
14
  const AddingButton = ({ id, onClick, onClose, onFinish }: any) => {
14
15
  const addNotification = useReqoreProperty('addNotification');
@@ -54,10 +55,7 @@ const UpdatingButton = ({ id }) => {
54
55
  );
55
56
  };
56
57
 
57
- const Template: Story<IReqoreNotificationProps & IReqoreUIProviderProps> = ({
58
- theme,
59
- ...args
60
- }: IReqoreNotificationProps & IReqoreUIProviderProps & { id?: string | number }) => (
58
+ const Template: StoryRenderer<typeof meta> = ({ theme, ...args }) => (
61
59
  <ReqoreUIProvider theme={theme}>
62
60
  <div
63
61
  style={{
@@ -71,35 +69,49 @@ const Template: Story<IReqoreNotificationProps & IReqoreUIProviderProps> = ({
71
69
  >
72
70
  <h4>Hello, I am a notification testing page</h4>
73
71
  <AddingButton {...args} />
74
- {args.id && <UpdatingButton id={args.id} />}
72
+ {args.notificationId && <UpdatingButton id={args.id} />}
75
73
  </div>
76
74
  </ReqoreUIProvider>
77
75
  );
78
76
 
79
- export const Adding = Template.bind({});
77
+ export const Adding: Story = {
78
+ render: Template,
79
+ };
80
+
81
+ export const Updating: Story = {
82
+ render: Template,
80
83
 
81
- export const Updating = Template.bind({});
82
- Updating.args = {
83
- id: 'test',
84
+ args: {
85
+ notificationId: 'test',
86
+ },
84
87
  };
85
88
 
86
- export const Clickable = Template.bind({});
87
- Clickable.args = {
88
- onClick: (id) => {
89
- alert(`Notification ${id} clicked`);
89
+ export const Clickable: Story = {
90
+ render: Template,
91
+
92
+ args: {
93
+ onClick: () => {
94
+ alert(`Notification clicked`);
95
+ },
90
96
  },
91
97
  };
92
98
 
93
- export const CloseCallback = Template.bind({});
94
- CloseCallback.args = {
95
- onClose: (id) => {
96
- alert(`Notification ${id} closed`);
99
+ export const CloseCallback: Story = {
100
+ render: Template,
101
+
102
+ args: {
103
+ onClose: () => {
104
+ alert(`Notification closed`);
105
+ },
97
106
  },
98
107
  };
99
108
 
100
- export const FinishCallback = Template.bind({});
101
- FinishCallback.args = {
102
- onFinish: (id) => {
103
- alert(`Notification ${id} finished`);
109
+ export const FinishCallback: Story = {
110
+ render: Template,
111
+
112
+ args: {
113
+ onFinish: () => {
114
+ alert(`Notification finished`);
115
+ },
104
116
  },
105
117
  };
@@ -1,4 +1,4 @@
1
- import { Meta, Story } from '@storybook/react/types-6-0';
1
+ import { StoryFn, StoryObj } from '@storybook/react';
2
2
  import { noop } from 'lodash';
3
3
  import { useState } from 'react';
4
4
  import { useMount } from 'react-use';
@@ -7,13 +7,17 @@ import ReqoreNotification, {
7
7
  } from '../../components/Notifications/notification';
8
8
  import { IReqoreUIProviderProps } from '../../containers/UIProvider';
9
9
  import { ReqoreTag, ReqoreUIProvider } from '../../index';
10
+ import { StoryMeta } from '../utils';
10
11
 
11
- export default {
12
+ const meta: StoryMeta<typeof ReqoreNotification> = {
12
13
  title: 'Other/Notifications/Item/Stories',
13
14
  component: ReqoreNotification,
14
- } as Meta;
15
+ };
16
+
17
+ export default meta;
18
+ type Story = StoryObj<typeof meta>;
15
19
 
16
- const Template: Story<IReqoreNotificationProps & IReqoreUIProviderProps> = ({
20
+ const Template: StoryFn<IReqoreNotificationProps & IReqoreUIProviderProps> = ({
17
21
  theme,
18
22
  ...args
19
23
  }: IReqoreNotificationProps & IReqoreUIProviderProps) => (
@@ -119,7 +123,7 @@ const Template: Story<IReqoreNotificationProps & IReqoreUIProviderProps> = ({
119
123
  </ReqoreUIProvider>
120
124
  );
121
125
 
122
- const SingleTemplate: Story<IReqoreNotificationProps & IReqoreUIProviderProps> = ({
126
+ const SingleTemplate: StoryFn<IReqoreNotificationProps & IReqoreUIProviderProps> = ({
123
127
  theme,
124
128
  ...args
125
129
  }: IReqoreNotificationProps & IReqoreUIProviderProps) => (
@@ -128,46 +132,54 @@ const SingleTemplate: Story<IReqoreNotificationProps & IReqoreUIProviderProps> =
128
132
  </ReqoreUIProvider>
129
133
  );
130
134
 
131
- export const Default = Template.bind({});
135
+ export const Default: Story = {
136
+ render: Template,
137
+ };
132
138
 
133
- export const CustomColors = Template.bind({});
139
+ export const CustomColors: Story = {
140
+ render: Template,
134
141
 
135
- CustomColors.args = {
136
- theme: {
137
- notifications: {
138
- info: '#6c2d80',
139
- success: '#81a194',
140
- pending: '#b8d8f5',
141
- warning: '#382d31',
142
- danger: '#786714',
142
+ args: {
143
+ theme: {
144
+ notifications: {
145
+ info: '#6c2d80',
146
+ success: '#81a194',
147
+ pending: '#b8d8f5',
148
+ warning: '#382d31',
149
+ danger: '#786714',
150
+ },
143
151
  },
144
152
  },
145
- } as IReqoreUIProviderProps;
146
-
147
- export const CustomColors2 = Template.bind({});
148
-
149
- CustomColors2.args = {
150
- theme: {
151
- notifications: {
152
- info: '#d6bac0',
153
- success: '#2aeb37',
154
- pending: '#181d7d',
155
- warning: '#96714e',
156
- danger: '#b87cd6',
153
+ };
154
+
155
+ export const CustomColors2: Story = {
156
+ render: Template,
157
+
158
+ args: {
159
+ theme: {
160
+ notifications: {
161
+ info: '#d6bac0',
162
+ success: '#2aeb37',
163
+ pending: '#181d7d',
164
+ warning: '#96714e',
165
+ danger: '#b87cd6',
166
+ },
157
167
  },
158
168
  },
159
- } as IReqoreUIProviderProps;
169
+ };
160
170
 
161
- export const WithTimeout = SingleTemplate.bind({});
171
+ export const WithTimeout: Story = {
172
+ render: SingleTemplate,
162
173
 
163
- WithTimeout.args = {
164
- type: 'info',
165
- content: 'I am a notification with a 10s timeout',
166
- onClick: noop,
167
- duration: 10000,
174
+ args: {
175
+ type: 'info',
176
+ content: 'I am a notification with a 10s timeout',
177
+ onClick: noop,
178
+ duration: 10000,
179
+ },
168
180
  };
169
181
 
170
- const UpdateTemplate: Story<IReqoreNotificationProps & IReqoreUIProviderProps> = ({
182
+ const UpdateTemplate: StoryFn<IReqoreNotificationProps & IReqoreUIProviderProps> = ({
171
183
  theme,
172
184
  ...args
173
185
  }: IReqoreNotificationProps & IReqoreUIProviderProps) => {
@@ -192,11 +204,13 @@ const UpdateTemplate: Story<IReqoreNotificationProps & IReqoreUIProviderProps> =
192
204
  );
193
205
  };
194
206
 
195
- export const WithUpdate = UpdateTemplate.bind({});
207
+ export const WithUpdate: Story = {
208
+ render: UpdateTemplate,
196
209
 
197
- WithUpdate.args = {
198
- type: 'pending',
199
- content: 'I am a notification with a 10s timeout thats gonna update',
200
- onClick: noop,
201
- duration: 10000,
210
+ args: {
211
+ type: 'pending',
212
+ content: 'I am a notification with a 10s timeout thats gonna update',
213
+ onClick: noop,
214
+ duration: 10000,
215
+ },
202
216
  };
@@ -1,35 +1,33 @@
1
- import { Meta, Story } from '@storybook/react/types-6-0';
1
+ import { StoryFn, StoryObj } from '@storybook/react';
2
2
  import { noop } from 'lodash';
3
3
  import ReqoreNotificationsWrapper, {
4
4
  IReqoreNotificationsWrapperProps,
5
5
  } from '../../components/Notifications';
6
- import ReqoreNotification, {
7
- IReqoreNotificationProps,
8
- } from '../../components/Notifications/notification';
6
+ import ReqoreNotification from '../../components/Notifications/notification';
9
7
  import { IReqoreUIProviderProps } from '../../containers/UIProvider';
10
8
  import { ReqoreUIProvider } from '../../index';
9
+ import { StoryMeta } from '../utils';
11
10
 
12
- export default {
11
+ const meta: StoryMeta<typeof ReqoreNotificationsWrapper> = {
13
12
  title: 'Other/Notifications/Wrapper/Stories',
14
- component: ReqoreNotification,
15
- } as Meta;
13
+ component: ReqoreNotificationsWrapper,
14
+ };
15
+
16
+ export default meta;
17
+ type Story = StoryObj<typeof meta>;
16
18
 
17
- const Template: Story<
18
- IReqoreNotificationProps & IReqoreUIProviderProps & IReqoreNotificationsWrapperProps
19
- > = ({
19
+ const Template: StoryFn<IReqoreUIProviderProps & IReqoreNotificationsWrapperProps> = ({
20
20
  theme,
21
21
  ...args
22
- }: IReqoreNotificationProps & IReqoreUIProviderProps & IReqoreNotificationsWrapperProps) => (
22
+ }) => (
23
23
  <ReqoreUIProvider theme={theme}>
24
24
  <ReqoreNotificationsWrapper position={args.position}>
25
25
  <ReqoreNotification
26
- {...args}
27
26
  type='info'
28
27
  content="Hello, I am a very simple notification. Look at me, look at me? Isn't this great?"
29
28
  onClick={noop}
30
29
  />
31
30
  <ReqoreNotification
32
- {...args}
33
31
  type='info'
34
32
  content="Hello, I am a very simple notification. Look at me, look at me? Isn't this great?"
35
33
  onClick={noop}
@@ -38,28 +36,46 @@ const Template: Story<
38
36
  </ReqoreUIProvider>
39
37
  );
40
38
 
41
- export const Top = Template.bind({});
42
- export const Bottom = Template.bind({});
43
- Bottom.args = {
44
- position: 'BOTTOM',
39
+ export const Top: Story = {
40
+ render: Template,
45
41
  };
46
42
 
47
- export const TopLeft = Template.bind({});
48
- TopLeft.args = {
49
- position: 'TOP LEFT',
43
+ export const Bottom: Story = {
44
+ render: Template,
45
+
46
+ args: {
47
+ position: 'BOTTOM',
48
+ },
50
49
  };
51
50
 
52
- export const TopRight = Template.bind({});
53
- TopRight.args = {
54
- position: 'TOP RIGHT',
51
+ export const TopLeft: Story = {
52
+ render: Template,
53
+
54
+ args: {
55
+ position: 'TOP LEFT',
56
+ },
55
57
  };
56
58
 
57
- export const BottomLeft = Template.bind({});
58
- BottomLeft.args = {
59
- position: 'BOTTOM LEFT',
59
+ export const TopRight: Story = {
60
+ render: Template,
61
+
62
+ args: {
63
+ position: 'TOP RIGHT',
64
+ },
60
65
  };
61
66
 
62
- export const BottomRight = Template.bind({});
63
- BottomRight.args = {
64
- position: 'BOTTOM RIGHT',
67
+ export const BottomLeft: Story = {
68
+ render: Template,
69
+
70
+ args: {
71
+ position: 'BOTTOM LEFT',
72
+ },
73
+ };
74
+
75
+ export const BottomRight: Story = {
76
+ render: Template,
77
+
78
+ args: {
79
+ position: 'BOTTOM RIGHT',
80
+ },
65
81
  };