Show how to import custom fonts in Storybook
This commit is contained in:
parent
23a71f8fa0
commit
bb019e66fb
@ -50,8 +50,12 @@ export default function Template(props: TemplateProps<KcContext, I18n>) {
|
|||||||
return (
|
return (
|
||||||
<div className={getClassName("kcLoginClass")}>
|
<div className={getClassName("kcLoginClass")}>
|
||||||
<div id="kc-header" className={getClassName("kcHeaderClass")}>
|
<div id="kc-header" className={getClassName("kcHeaderClass")}>
|
||||||
<div id="kc-header-wrapper" className={getClassName("kcHeaderWrapperClass")}>
|
<div
|
||||||
{msg("loginTitleHtml", realm.displayNameHtml)}
|
id="kc-header-wrapper"
|
||||||
|
className={getClassName("kcHeaderWrapperClass")}
|
||||||
|
style={{ "fontFamily": '"Work Sans"' }}
|
||||||
|
>
|
||||||
|
{msg("loginTitleHtml", realm.displayNameHtml)}!!!
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -15,7 +15,13 @@ export function createPageStory<PageId extends KcContext["pageId"]>(params: {
|
|||||||
storyPartialKcContext: params.kcContext
|
storyPartialKcContext: params.kcContext
|
||||||
});
|
});
|
||||||
|
|
||||||
return <KcApp kcContext={kcContext} />;
|
return (
|
||||||
|
<>
|
||||||
|
{/* If you import custom fonts in your index.html you have to import them in storybook as well*/}
|
||||||
|
<link rel="stylesheet" type="text/css" href="fonts/WorkSans/font.css" />
|
||||||
|
<KcApp kcContext={kcContext} />
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user