feat(storybook): progress on many more pages
This commit is contained in:
parent
dbe320b2fc
commit
1e1a638011
30 changed files with 1061 additions and 300 deletions
|
|
@ -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'})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue