feat(storybook): progress on many more pages

This commit is contained in:
Waldemar Reusch 2023-03-14 17:29:14 +01:00
parent dbe320b2fc
commit 1e1a638011
30 changed files with 1061 additions and 300 deletions

View file

@ -1,29 +1,18 @@
import { ComponentMeta } from '@storybook/react';
import {ComponentMeta} from '@storybook/react';
import KcApp from '../KcApp';
import { useKcStoryData } from '../../../.storybook/data'
import {template} from '../../../.storybook/util'
export default {
title: 'My Extra Page 2',
component: KcApp,
parameters: {
layout: 'fullscreen',
},
kind: 'Page',
title: 'Theme/Pages/My Extra Page 2',
component: KcApp,
parameters: {
layout: 'fullscreen',
},
} as ComponentMeta<typeof KcApp>;
const pageId = 'my-extra-page-2.ftl'
const bind = template('my-extra-page-2.ftl')
export const Default = () => {
const { kcContext } = useKcStoryData({ pageId })
return <KcApp kcContext={kcContext} />
}
export const Default = bind({})
export const InFrench = () => {
const { kcContext } = useKcStoryData({ pageId, locale: { currentLanguageTag: 'fr' } })
return <KcApp kcContext={kcContext} />
}
export const WithCustomValue = () => {
const { kcContext } = useKcStoryData({ pageId, someCustomValue: 'Foo Bar Baz' })
return <KcApp kcContext={kcContext} />
}
export const WithCustomValue = bind({someCustomValue: 'Foo Bar Baz'})