@kindly/react-chat 2.42.1 → 2.43.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.
@@ -1,4 +1,6 @@
1
- import React from 'react';
1
+ import React, { useEffect } from 'react';
2
+
3
+ import { fontFace } from 'app/styles/fonts';
2
4
 
3
5
  const viewports = {
4
6
  smallMobile: {
@@ -44,11 +46,19 @@ function viewportsToWidthInts(...viewportArray) {
44
46
  export const chromaticViewports = viewportsToWidthInts(viewports.smallMobile, viewports.tablet, viewports.smallDesktop);
45
47
 
46
48
  export const decorators = [
47
- (Story) => (
48
- <div style={{ minHeight: 500 }}>
49
- <Story />
50
- </div>
51
- ),
49
+ (Story) => {
50
+ useEffect(() => {
51
+ const styleTag = document.createElement('style');
52
+ const fontFaceText = document.createTextNode(fontFace);
53
+ styleTag.appendChild(fontFaceText);
54
+ document.head.appendChild(styleTag);
55
+ }, []);
56
+ return (
57
+ <div style={{ minHeight: 500 }}>
58
+ <Story />
59
+ </div>
60
+ );
61
+ },
52
62
  ];
53
63
 
54
64
  export const parameters = {