Skip to content

Commit

Permalink
Merge pull request #14422 from storybookjs/fix/storySortDocs
Browse files Browse the repository at this point in the history
Addon-docs/ArgsTable: Use storySort parameter
  • Loading branch information
shilman committed Apr 2, 2021
2 parents 79c1c52 + df5907a commit d9dcd16
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions addons/docs/src/blocks/ArgsTable.tsx
Expand Up @@ -132,7 +132,7 @@ export const StoryTable: FC<
parameters: { argTypes },
storyStore,
} = context;
const { story, component, subcomponents, showComponent, include, exclude } = props;
const { story, component, subcomponents, showComponent, include, exclude, sort } = props;
let storyArgTypes;
try {
let storyId;
Expand Down Expand Up @@ -187,7 +187,7 @@ export const StoryTable: FC<
}
tabs = addComponentTabs(tabs, subcomponents, context, include, exclude);
}
return <TabbedArgsTable tabs={tabs} />;
return <TabbedArgsTable tabs={tabs} sort={sort} />;
} catch (err) {
return <PureArgsTable error={err.message} />;
}
Expand Down
3 changes: 2 additions & 1 deletion lib/components/src/blocks/ArgsTable/TabbedArgsTable.tsx
@@ -1,9 +1,10 @@
import React, { FC } from 'react';
import { ArgsTable, ArgsTableProps } from './ArgsTable';
import { ArgsTable, ArgsTableProps, SortType } from './ArgsTable';
import { TabsState } from '../../tabs/tabs';

export interface TabbedArgsTableProps {
tabs: Record<string, ArgsTableProps>;
sort?: SortType;
}

export const TabbedArgsTable: FC<TabbedArgsTableProps> = ({ tabs, ...props }) => {
Expand Down

0 comments on commit d9dcd16

Please sign in to comment.