mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-31 05:03:21 +08:00
commit
820dddd072
@ -1,4 +1,4 @@
|
||||
import storySort from './storySort';
|
||||
import { storySort } from './storySort';
|
||||
|
||||
describe('preview.storySort', () => {
|
||||
const fixture = {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { StorySortObjectParameter, Comparator } from '@storybook/addons';
|
||||
|
||||
const storySort = (options: StorySortObjectParameter = {}): Comparator<any> => (
|
||||
export const storySort = (options: StorySortObjectParameter = {}): Comparator<any> => (
|
||||
a: any,
|
||||
b: any
|
||||
): number => {
|
||||
@ -73,5 +73,3 @@ const storySort = (options: StorySortObjectParameter = {}): Comparator<any> => (
|
||||
/* istanbul ignore next */
|
||||
return 0;
|
||||
};
|
||||
|
||||
export default storySort;
|
||||
|
@ -32,7 +32,7 @@ import {
|
||||
StoreSelection,
|
||||
} from './types';
|
||||
import { HooksContext } from './hooks';
|
||||
import storySort from './storySort';
|
||||
import { storySort } from './storySort';
|
||||
import { combineParameters } from './parameters';
|
||||
import { inferArgTypes } from './inferArgTypes';
|
||||
|
||||
@ -387,12 +387,12 @@ export default class StoryStore {
|
||||
const __isArgsStory = passArgsFirst && original.length > 0;
|
||||
|
||||
const { argTypes = {} } = this._argTypesEnhancers.reduce(
|
||||
(accumlatedParameters: Parameters, enhancer) => ({
|
||||
...accumlatedParameters,
|
||||
(accumulatedParameters: Parameters, enhancer) => ({
|
||||
...accumulatedParameters,
|
||||
argTypes: enhancer({
|
||||
...identification,
|
||||
storyFn: original,
|
||||
parameters: accumlatedParameters,
|
||||
parameters: accumulatedParameters,
|
||||
args: {},
|
||||
argTypes: {},
|
||||
globals: {},
|
||||
|
Loading…
x
Reference in New Issue
Block a user