diff --git a/package.json b/package.json index e6ada739..c088e1eb 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "@reduxjs/toolkit": "^1.9.5", "@status-im/colors": "*", "@status-im/components": "^0.3.0", + "@storybook/addon-actions": "^7.4.0", "@tamagui/config": "1.36.4", "@tamagui/react-17-patch": "1.36.4", "@tamagui/vite-plugin": "1.36.4", diff --git a/src/pages/ValidatorOnboarding/ValidatorSetup/ConsensusSelection.stories.tsx b/src/pages/ValidatorOnboarding/ValidatorSetup/ConsensusSelection.stories.tsx new file mode 100644 index 00000000..ba6ead6e --- /dev/null +++ b/src/pages/ValidatorOnboarding/ValidatorSetup/ConsensusSelection.stories.tsx @@ -0,0 +1,27 @@ +import { useEffect } from 'react' +import { useDispatch } from 'react-redux' +import ConsensusSelection from './ConsensusSelection' +import { withRouter } from 'storybook-addon-react-router-v6' +import { selectClient } from '../../../redux/ValidatorOnboarding/ValidatorSetup/slice' + +export default { + title: 'ValidatorOnboarding/ConsensusSelection', + component: ConsensusSelection, + parameters: { + layout: 'centered', + }, + tags: ['autodocs'], + decorators: [withRouter()], +} + +type ConsensusSelectionProps = React.ComponentPropsWithoutRef + +export const Default: React.FC = args => { + const dispatch = useDispatch() + + useEffect(() => { + dispatch(selectClient('Erigon')) + }, [dispatch]) + + return +} diff --git a/yarn.lock b/yarn.lock index 73369add..26c5831f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4479,7 +4479,7 @@ __metadata: languageName: node linkType: hard -"@storybook/addon-actions@npm:7.4.0": +"@storybook/addon-actions@npm:7.4.0, @storybook/addon-actions@npm:^7.4.0": version: 7.4.0 resolution: "@storybook/addon-actions@npm:7.4.0" dependencies: @@ -15064,6 +15064,7 @@ __metadata: "@reduxjs/toolkit": ^1.9.5 "@status-im/colors": "*" "@status-im/components": ^0.3.0 + "@storybook/addon-actions": ^7.4.0 "@storybook/addon-essentials": ^7.2.0 "@storybook/addon-interactions": ^7.2.0 "@storybook/addon-links": ^7.2.0