Skip to content

Commit

Permalink
chore: host font files locally in storybook (#351)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-jonas authored Feb 4, 2025
1 parent 1a973b7 commit 95486cf
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/elements-react-stories/.storybook/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
/* SPDX-License-Identifier: Apache-2.0 */

html {
--font-sans: "Inter", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
--font-sans: "InterVariable", "Helvetica Neue", "Helvetica", "Arial",
sans-serif;
}
14 changes: 12 additions & 2 deletions packages/elements-react-stories/.storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<!-- Copyright © 2024 Ory Corp -->
<!-- SPDX-License-Identifier: Apache-2.0 -->

<link rel="preconnect" href="https://rsms.me/" />
<link rel="stylesheet" href="https://rsms.me/inter/inter.css" />
<link
rel="preload"
href="/InterVariable.woff2?v=4.1"
as="font"
type="font/woff2"
crossorigin="anonymous"
/>
<link rel="stylesheet" href="/inter.css" />

<script>
window.oryPasskeyLoginAutocompleteInit = function () {}
</script>
Binary file not shown.
8 changes: 8 additions & 0 deletions packages/elements-react-stories/public/inter.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

@font-face {
font-family: InterVariable;
font-style: normal;
font-weight: 100 900;
font-display: swap;
src: url('/InterVariable.woff2?v=4.1') format('woff2');
}

0 comments on commit 95486cf

Please sign in to comment.