Outside of Keycloak - Without Storybook
This option for testing your theme is a fallback option if you prefer avoiding introducing Storybook into your project.
To do that, just uncomment the following lines in :
src/[main|index].tsx?
The pageId
parameter of the getKcContextMock
lets you decide what page you want to test.
The overrides parameter lets you modify the default kcContext mock for the page.
For example you can overwrite the kcContext.locale.currentLanguageTag
to preview your page in a different language.
Then start the dev server of your, project:
When you're done testing, don't forget to comment back the import of the mock. Forgetting to do so will negatively impact the bundle size of your pages.
Last updated