Skip to content

Commit c04e1a6

Browse files
fix(table-key-value-pair): story types and argTypes for CI
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 514c322 commit c04e1a6

1 file changed

Lines changed: 25 additions & 13 deletions

File tree

src/components/table-key-value-pair/table-key-value-pair.stories.tsx

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,21 @@ import type { Meta, StoryObj } from '@storybook/react-vite'
33
import { TableKeyValuePair } from './table-key-value-pair'
44
import { 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

3547
export default meta
36-
type Story = StoryObj<typeof TableKeyValuePair>
48+
type Story = StoryObj<typeof meta>
3749

3850
interface Person {
3951
id: number

0 commit comments

Comments
 (0)