From bb019e66fb09166cb9af1e24e230994f59daa420 Mon Sep 17 00:00:00 2001 From: Joseph Garrone Date: Thu, 2 Nov 2023 21:27:34 +0100 Subject: [PATCH] Show how to import custom fonts in Storybook --- src/keycloak-theme/login/Template.tsx | 8 ++++++-- src/keycloak-theme/login/createPageStory.tsx | 8 +++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/keycloak-theme/login/Template.tsx b/src/keycloak-theme/login/Template.tsx index 871bca1..cb663b9 100644 --- a/src/keycloak-theme/login/Template.tsx +++ b/src/keycloak-theme/login/Template.tsx @@ -50,8 +50,12 @@ export default function Template(props: TemplateProps) { return (
-
- {msg("loginTitleHtml", realm.displayNameHtml)} +
+ {msg("loginTitleHtml", realm.displayNameHtml)}!!!
diff --git a/src/keycloak-theme/login/createPageStory.tsx b/src/keycloak-theme/login/createPageStory.tsx index cdf570f..24a5d70 100644 --- a/src/keycloak-theme/login/createPageStory.tsx +++ b/src/keycloak-theme/login/createPageStory.tsx @@ -15,7 +15,13 @@ export function createPageStory(params: { storyPartialKcContext: params.kcContext }); - return ; + return ( + <> + {/* If you import custom fonts in your index.html you have to import them in storybook as well*/} + + + + ); }