@wf-financing/ui 1.3.1 → 1.3.2
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/CHANGELOG.md +6 -0
- package/dist/index.es.js +12831 -12787
- package/package.json +1 -1
- package/src/config/fontParameters.ts +3 -3
- package/src/main.tsx +6 -3
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
const dmSansParams = {
|
|
2
2
|
fontFamily: 'DM Sans',
|
|
3
|
-
fontUrl: 'https://
|
|
3
|
+
fontUrl: 'https://app.wayflyer.com/flyui-assets/fonts/dm-sans/DMSans-VariableFont_opsz,wght.ttf',
|
|
4
4
|
};
|
|
5
5
|
const sourceSansParams = {
|
|
6
6
|
fontFamily: 'Source Sans Pro',
|
|
7
|
-
fontUrl: 'https://
|
|
7
|
+
fontUrl: 'https://app.wayflyer.com/flyui-assets/fonts/source-sans/SourceSans3-VariableFont_wght.ttf',
|
|
8
8
|
};
|
|
9
9
|
const merrionSansParams = {
|
|
10
10
|
fontFamily: 'Merrion Sans',
|
|
11
|
-
fontUrl: 'https://
|
|
11
|
+
fontUrl: 'https://app.wayflyer.com/flyui-assets/fonts/merrion-sans/Merrion_Sans-Medium.woff2',
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
export const FONT_PARAMS = {
|
package/src/main.tsx
CHANGED
|
@@ -4,7 +4,7 @@ import ReactDOM from 'react-dom/client';
|
|
|
4
4
|
import { StyleSheetManager } from 'styled-components';
|
|
5
5
|
|
|
6
6
|
import { App } from './App';
|
|
7
|
-
import { createRoots } from './utils';
|
|
7
|
+
import { createRoots, applyFont } from './utils';
|
|
8
8
|
|
|
9
9
|
let root: ReactDOM.Root | undefined = undefined;
|
|
10
10
|
|
|
@@ -20,8 +20,11 @@ export const mountToTarget = async (
|
|
|
20
20
|
|
|
21
21
|
const shadow = hostEl.shadowRoot ?? hostEl.attachShadow({ mode: 'open' });
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
try {
|
|
24
|
+
await applyFont(shadow, partnerDesignId);
|
|
25
|
+
} catch (error) {
|
|
26
|
+
console.error(error);
|
|
27
|
+
}
|
|
25
28
|
|
|
26
29
|
const { styledComponentsStyleRoot, portalRoot, bannerRoot } = createRoots(shadow);
|
|
27
30
|
|