@kindly/react-chat 2.39.4 → 2.39.6

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.
@@ -1,3 +1,56 @@
1
+ import React from 'react';
2
+
3
+ const viewports = {
4
+ smallMobile: {
5
+ name: 'Small mobile',
6
+ styles: {
7
+ height: '568px',
8
+ width: '360px',
9
+ },
10
+ type: 'mobile',
11
+ },
12
+ largeMobile: {
13
+ name: 'Large mobile',
14
+ styles: {
15
+ height: '898px',
16
+ width: '414px',
17
+ },
18
+ type: 'mobile',
19
+ },
20
+ tablet: {
21
+ name: 'Tablet',
22
+ styles: {
23
+ height: '1024px',
24
+ width: '768px',
25
+ },
26
+ type: 'tablet',
27
+ },
28
+ smallDesktop: {
29
+ name: 'Small desktop',
30
+ styles: {
31
+ height: '720px',
32
+ width: '1280px',
33
+ },
34
+ type: 'desktop',
35
+ },
36
+ };
37
+
38
+ function viewportsToWidthInts(...viewportArray) {
39
+ return viewportArray.map((viewport) => {
40
+ return parseInt(viewport.styles.width, 10);
41
+ });
42
+ }
43
+
44
+ export const chromaticViewports = viewportsToWidthInts(viewports.smallMobile, viewports.tablet, viewports.smallDesktop);
45
+
46
+ export const decorators = [
47
+ (Story) => (
48
+ <div style={{ minHeight: 500 }}>
49
+ <Story />
50
+ </div>
51
+ ),
52
+ ];
53
+
1
54
  export const parameters = {
2
55
  actions: { argTypesRegex: '^on[A-Z].*' },
3
56
  controls: {
@@ -12,6 +65,9 @@ export const parameters = {
12
65
  rules: [{ id: 'color-contrast', enabled: false }],
13
66
  },
14
67
  },
68
+ viewport: {
69
+ viewports,
70
+ },
15
71
  };
16
72
 
17
73
  export const argTypes = {
@@ -18,9 +18,6 @@ module.exports = {
18
18
  }
19
19
 
20
20
  await page.waitForLoadState('domcontentloaded');
21
- await new Promise((resolve) => {
22
- setTimeout(resolve, 1000);
23
- });
24
21
 
25
22
  await checkA11y(page, '#root', {
26
23
  detailedReport: true,