Skip to content

Commit

Permalink
chore: fix typography loading in storybook (#2242)
Browse files Browse the repository at this point in the history
- Typography was loading but not being applied to the DOM correctly for baseline images. All baseline images will be updated by this change.
  • Loading branch information
castastrophe authored Oct 31, 2023
1 parent 17b3374 commit be0fe02
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tools/preview/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,19 @@ window.addEventListener("DOMContentLoaded", () => {
clearTimeout(t);

try {
Typekit.load(config);
window.Typekit = Typekit.load({
kitId,
scriptTimeout: 3000,
active: function () {
var loader = document.getElementById("loader");
if (loader) {
setTimeout(function () {
// Hide the loader
loader.style.display = "none";
}, 125);
}
},
});
} catch (b) {}
};

Expand Down

0 comments on commit be0fe02

Please sign in to comment.