@@ -3,9 +3,21 @@ import type { Meta, StoryObj } from '@storybook/react-vite'
33import { TableKeyValuePair } from './table-key-value-pair'
44import { FormField } from '../form-field'
55
6- const meta : Meta < typeof TableKeyValuePair > = {
6+ type TableKeyValuePairStoryArgs = {
7+ header : string
8+ firstNameLabel : string
9+ firstNameValue : string
10+ ageLabel : string
11+ ageValue : string
12+ lastNameLabel : string
13+ lastNameValue : string
14+ birthLabel : string
15+ birthValue : string
16+ linkLabel : string
17+ }
18+
19+ const meta : Meta < TableKeyValuePairStoryArgs > = {
720 title : 'Table / Key-Value Pairs' ,
8- component : TableKeyValuePair ,
921 args : {
1022 header : 'Details' ,
1123 firstNameLabel : 'First Name' ,
@@ -19,21 +31,21 @@ const meta: Meta<typeof TableKeyValuePair> = {
1931 linkLabel : 'Open Comments' ,
2032 } ,
2133 argTypes : {
22- header : { control : 'text' } ,
23- firstNameLabel : { control : 'text' } ,
24- firstNameValue : { control : 'text' } ,
25- ageLabel : { control : 'text' } ,
26- ageValue : { control : 'text' } ,
27- lastNameLabel : { control : 'text' } ,
28- lastNameValue : { control : 'text' } ,
29- birthLabel : { control : 'text' } ,
30- birthValue : { control : 'text' } ,
31- linkLabel : { control : 'text' } ,
34+ header : { control : { type : 'text' } } ,
35+ firstNameLabel : { control : { type : 'text' } } ,
36+ firstNameValue : { control : { type : 'text' } } ,
37+ ageLabel : { control : { type : 'text' } } ,
38+ ageValue : { control : { type : 'text' } } ,
39+ lastNameLabel : { control : { type : 'text' } } ,
40+ lastNameValue : { control : { type : 'text' } } ,
41+ birthLabel : { control : { type : 'text' } } ,
42+ birthValue : { control : { type : 'text' } } ,
43+ linkLabel : { control : { type : 'text' } } ,
3244 } ,
3345}
3446
3547export default meta
36- type Story = StoryObj < typeof TableKeyValuePair >
48+ type Story = StoryObj < typeof meta >
3749
3850interface Person {
3951 id : number
0 commit comments