From ef8522b6390a8025e979c1bf96ec19b94d236a18 Mon Sep 17 00:00:00 2001 From: RadoslavDimchev Date: Thu, 25 Apr 2024 18:31:58 +0300 Subject: [PATCH] feat(manage-validator): add rest of the stories --- .../LeftManage/LeftManage.stories.tsx | 18 +++++++ .../ValidatorDataTabs.stories.tsx | 18 +++++++ .../ValidatorDataCard.stories.tsx | 51 +++++++++++++++++++ .../ValidatorPeersCard.stories.tsx | 22 ++++++++ 4 files changed, 109 insertions(+) create mode 100644 src/pages/ManageValidator/LeftManage/LeftManage.stories.tsx create mode 100644 src/pages/ManageValidator/LeftManage/ManageValidatorTable/ValidatorDataTabs.stories.tsx create mode 100644 src/pages/ManageValidator/LeftManage/ValidatorDataCards/ValidatorDataCard.stories.tsx create mode 100644 src/pages/ManageValidator/LeftManage/ValidatorDataCards/ValidatorPeersCard.stories.tsx diff --git a/src/pages/ManageValidator/LeftManage/LeftManage.stories.tsx b/src/pages/ManageValidator/LeftManage/LeftManage.stories.tsx new file mode 100644 index 00000000..7a605504 --- /dev/null +++ b/src/pages/ManageValidator/LeftManage/LeftManage.stories.tsx @@ -0,0 +1,18 @@ +import type { Meta, StoryObj } from '@storybook/react' +import { withRouter } from 'storybook-addon-react-router-v6' + +import LeftManage from './LeftManage' + +const meta = { + title: 'ManageValidator/LeftManage', + component: LeftManage, + decorators: [withRouter], + tags: ['autodocs'], +} satisfies Meta + +export default meta +type Story = StoryObj + +export const Default: Story = { + args: {}, +} diff --git a/src/pages/ManageValidator/LeftManage/ManageValidatorTable/ValidatorDataTabs.stories.tsx b/src/pages/ManageValidator/LeftManage/ManageValidatorTable/ValidatorDataTabs.stories.tsx new file mode 100644 index 00000000..bdb4c4d8 --- /dev/null +++ b/src/pages/ManageValidator/LeftManage/ManageValidatorTable/ValidatorDataTabs.stories.tsx @@ -0,0 +1,18 @@ +import type { Meta, StoryObj } from '@storybook/react' +import { withRouter } from 'storybook-addon-react-router-v6' + +import ValidatorDataTabs from './ValidatorDataTabs' + +const meta = { + title: 'ManageValidator/ValidatorDataTabs', + component: ValidatorDataTabs, + decorators: [withRouter], + tags: ['autodocs'], +} satisfies Meta + +export default meta +type Story = StoryObj + +export const Default: Story = { + args: {}, +} diff --git a/src/pages/ManageValidator/LeftManage/ValidatorDataCards/ValidatorDataCard.stories.tsx b/src/pages/ManageValidator/LeftManage/ValidatorDataCards/ValidatorDataCard.stories.tsx new file mode 100644 index 00000000..c730cb19 --- /dev/null +++ b/src/pages/ManageValidator/LeftManage/ValidatorDataCards/ValidatorDataCard.stories.tsx @@ -0,0 +1,51 @@ +import type { Meta, StoryObj } from '@storybook/react' + +import ValidatorDataCard from './ValidatorDataCard' + +const meta = { + title: 'ManageValidator/ValidatorDataCard', + component: ValidatorDataCard, + parameters: { + layout: 'centered', + }, + tags: ['autodocs'], +} satisfies Meta + +export default meta +type Story = StoryObj + +export const Default: Story = { + args: { + title: 'Slots Behind', + value: 19, + iconPath: 'ghost.png', + }, +} + +export const Blocks: Story = { + args: { + title: 'Blocks', + value: 1452, + iconPath: 'rubiks-cube.png', + isFractionResult: true, + fractionValue: 987, + }, +} + +export const Attestations: Story = { + args: { + title: 'Attestations', + value: 2199, + iconPath: 'pacman.png', + fractionValue: 1023, + isFractionResult: true, + }, +} + +export const Syncs: Story = { + args: { + title: 'Syncs', + value: 1, + iconPath: 'toaster.png', + }, +} diff --git a/src/pages/ManageValidator/LeftManage/ValidatorDataCards/ValidatorPeersCard.stories.tsx b/src/pages/ManageValidator/LeftManage/ValidatorDataCards/ValidatorPeersCard.stories.tsx new file mode 100644 index 00000000..709684d4 --- /dev/null +++ b/src/pages/ManageValidator/LeftManage/ValidatorDataCards/ValidatorPeersCard.stories.tsx @@ -0,0 +1,22 @@ +import type { Meta, StoryObj } from '@storybook/react' + +import ValidatorPeersCard from './ValidatorPeersCard' + +const meta = { + title: 'ManageValidator/ValidatorPeersCard', + component: ValidatorPeersCard, + parameters: { + layout: 'centered', + }, + tags: ['autodocs'], +} satisfies Meta + +export default meta +type Story = StoryObj + +export const Default: Story = { + args: { + title: 'Peers', + value: '67', + }, +}