Skip to content

Commit be0fe02

Browse files
authored
chore: fix typography loading in storybook (#2242)
- Typography was loading but not being applied to the DOM correctly for baseline images. All baseline images will be updated by this change.
1 parent 17b3374 commit be0fe02

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

tools/preview/global.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,19 @@ window.addEventListener("DOMContentLoaded", () => {
2929
clearTimeout(t);
3030

3131
try {
32-
Typekit.load(config);
32+
window.Typekit = Typekit.load({
33+
kitId,
34+
scriptTimeout: 3000,
35+
active: function () {
36+
var loader = document.getElementById("loader");
37+
if (loader) {
38+
setTimeout(function () {
39+
// Hide the loader
40+
loader.style.display = "none";
41+
}, 125);
42+
}
43+
},
44+
});
3345
} catch (b) {}
3446
};
3547

0 commit comments

Comments
 (0)