Merge pull request #11717 from storybookjs/misc/cleanup

Misc cleanup
This commit is contained in:
Norbert de Langen 2020-07-29 10:55:44 +02:00 committed by GitHub
commit 820dddd072
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 8 deletions

View File

@ -1,4 +1,4 @@
import storySort from './storySort';
import { storySort } from './storySort';
describe('preview.storySort', () => {
const fixture = {

View File

@ -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;

View File

@ -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: {},