feat: create story for search component
This commit is contained in:
parent
ea1a8952e6
commit
7cfaa72955
|
@ -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: '',
|
||||
}
|
Loading…
Reference in New Issue