From 41a666756308182f2a4834ec411038d028fa0f75 Mon Sep 17 00:00:00 2001 From: RadoslavDimchev Date: Thu, 31 Aug 2023 06:14:48 +0300 Subject: [PATCH] feat: add stories examples for rec mechanism --- .../RecoveryMechanism.stories.ts | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/src/pages/ValidatorOnboarding/KeyGeneration/RecoveryMechanism/RecoveryMechanism.stories.ts b/src/pages/ValidatorOnboarding/KeyGeneration/RecoveryMechanism/RecoveryMechanism.stories.ts index 3484925b..0e44ab8b 100644 --- a/src/pages/ValidatorOnboarding/KeyGeneration/RecoveryMechanism/RecoveryMechanism.stories.ts +++ b/src/pages/ValidatorOnboarding/KeyGeneration/RecoveryMechanism/RecoveryMechanism.stories.ts @@ -1,7 +1,7 @@ import type { Meta, StoryObj } from '@storybook/react' import RecoveryMechanism from './RecoveryMechanism' -import { KEYSTORE_FILES } from '../../../../constants' +import { BOTH_KEY_AND_RECOVERY, KEYSTORE_FILES, RECOVERY_PHRASE } from '../../../../constants' const meta = { title: 'ValidatorOnboarding/RecoveryMechanism', @@ -16,9 +16,30 @@ const meta = { export default meta type Story = StoryObj -export const Page: Story = { +export const KeystoreFiles: Story = { args: { recoveryMechanism: KEYSTORE_FILES, handleRecMechanismChange: () => {}, }, } + +export const RecoveryPhrase: Story = { + args: { + recoveryMechanism: RECOVERY_PHRASE, + handleRecMechanismChange: () => {}, + }, +} + +export const BothKeystoreAndRecovery: Story = { + args: { + recoveryMechanism: BOTH_KEY_AND_RECOVERY, + handleRecMechanismChange: () => {}, + }, +} + +export const WithoutRecMechanism: Story = { + args: { + recoveryMechanism: '', + handleRecMechanismChange: () => {}, + }, +}