feat(storybook): update formatting; introduce new pages; update keycloakify
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import {ComponentMeta} from '@storybook/react';
|
||||
import { ComponentMeta } from '@storybook/react';
|
||||
import KcApp from '../KcApp';
|
||||
import {template} from '../../../.storybook/util'
|
||||
import { template } from '../../../.storybook/util'
|
||||
|
||||
const bind = template('login-config-totp.ftl');
|
||||
|
||||
export default {
|
||||
kind: 'Page',
|
||||
@@ -11,17 +13,15 @@ export default {
|
||||
},
|
||||
} as ComponentMeta<typeof KcApp>;
|
||||
|
||||
const bind = template('login-config-totp.ftl');
|
||||
|
||||
export const Default = bind({})
|
||||
|
||||
export const WithManualSetUp = bind({mode: 'manual'})
|
||||
export const WithManualSetUp = bind({ mode: 'manual' })
|
||||
export const WithError = bind({
|
||||
messagesPerField: {
|
||||
get: (fieldName: string) => fieldName === 'totp' ? 'Invalid TOTP' : undefined,
|
||||
exists: (fieldName: string) => fieldName === 'totp',
|
||||
existsError: (fieldName: string) => fieldName === 'totp',
|
||||
printIfExists: <T, >(fieldName: string, x: T) => fieldName === 'totp' ? x : undefined
|
||||
printIfExists: <T,>(fieldName: string, x: T) => fieldName === 'totp' ? x : undefined
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user