Skip to content

Commit 4553538

Browse files
Corrects the story
1 parent c8b1668 commit 4553538

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/components/Grid/Grid.stories.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ interface Props {
2020
row: number;
2121
column: number;
2222
};
23-
autoheight?: boolean;
23+
rowAutoHeight?: boolean;
2424
}
2525
const Grid = ({ columnCount, rowCount, focus: focusProp, ...props }: Props) => {
2626
const [focus, setFocus] = useState(focusProp);
@@ -72,7 +72,7 @@ const Grid = ({ columnCount, rowCount, focus: focusProp, ...props }: Props) => {
7272
});
7373
}}
7474
getMenuOptions={getMenuOptions}
75-
autoheight={props.autoheight}
75+
rowAutoHeight={props.rowAutoHeight}
7676
{...props}
7777
/>
7878
</div>
@@ -128,14 +128,14 @@ export const AutoHeightWithVariableData = {
128128
args: {
129129
rowCount: 10,
130130
columnCount: 5,
131-
autoheight: true,
131+
rowAutoHeight: true,
132132
rowStart: 0,
133133
},
134134
parameters: {
135135
docs: {
136136
source: {
137137
transform: (_: string, story: { args: Props; [x: string]: unknown }) => {
138-
const { rowCount, columnCount, autoheight, ...props } = story.args;
138+
const { rowCount, columnCount, rowAutoHeight, ...props } = story.args;
139139
return `
140140
const VariableCell: CellProps = ({ type, rowIndex, columnIndex, isScrolling, width, ...props }) => {
141141
let content = \`Row \${rowIndex}, Col \${columnIndex}\${rowIndex % 2 === 0 ? '\\nExtra line' : ''}\`;
@@ -175,7 +175,7 @@ SETTINGS index_granularity = 8192;\`;
175175
cell={VariableCell}
176176
focus={{ row: 0, column: 0 }}
177177
columnWidth={() => 300}
178-
autoheight={${autoheight}}
178+
rowAutoHeight={${rowAutoHeight}}
179179
${Object.entries(props)
180180
.flatMap(([key, value]) =>
181181
typeof value === "boolean"

0 commit comments

Comments
 (0)