feat: create story for search component

This commit is contained in:
RadoslavDimchev 2023-11-08 22:29:48 +02:00
parent ea1a8952e6
commit 7cfaa72955
1 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,26 @@
import { useState } from 'react'
import type { Meta, StoryObj } from '@storybook/react'
import SearchManagement from './SearchManagement'
const meta = {
title: 'ValidatorManagement/SearchManagement',
component: SearchManagement,
parameters: {
layout: 'centered',
},
tags: ['autodocs'],
} satisfies Meta<typeof SearchManagement>
export default meta
type Story = StoryObj<typeof meta>
export const Default: Story = (args: { searchValue: string }) => {
const [searchValue, setSearchValue] = useState(args.searchValue)
return <SearchManagement searchValue={searchValue} changeSearchValue={setSearchValue} />
}
Default.args = {
searchValue: '',
}