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
27
src/keycloak-theme/pages/LoginConfigTotp.stories.tsx
Normal file
27
src/keycloak-theme/pages/LoginConfigTotp.stories.tsx
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import {ComponentMeta} from '@storybook/react';
|
||||
import KcApp from '../KcApp';
|
||||
import {template} from '../../../.storybook/util'
|
||||
|
||||
export default {
|
||||
kind: 'Page',
|
||||
title: 'Theme/Pages/Login/Configure TOTP',
|
||||
component: KcApp,
|
||||
parameters: {
|
||||
layout: 'fullscreen',
|
||||
},
|
||||
} as ComponentMeta<typeof KcApp>;
|
||||
|
||||
const bind = template('login-config-totp.ftl');
|
||||
|
||||
export const Default = bind({})
|
||||
|
||||
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
|
||||
}
|
||||
})
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue