File tree Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ module.exports = {
9
9
'../storyhelpers/storybook-readme/preset.js' ,
10
10
] ,
11
11
framework : '@storybook/web-components' ,
12
+ features : { storyStoreV7 : true } ,
12
13
core : { builder : '@storybook/builder-vite' } ,
13
14
staticDirs : [ './images' ] ,
14
15
Original file line number Diff line number Diff line change @@ -5,16 +5,6 @@ import { setCustomElements } from '@storybook/web-components';
5
5
6
6
import customElements from '../custom-elements.json' ;
7
7
8
- const sort = ( a , b ) => {
9
- if ( a [ 1 ] . name === 'Overview' ) {
10
- return 0 ;
11
- }
12
- if ( b [ 1 ] . name === 'Overview' ) {
13
- return 1 ;
14
- }
15
- return a [ 0 ] > b [ 0 ] ;
16
- } ;
17
-
18
8
export const parameters = {
19
9
layout : 'padded' ,
20
10
actions : { argTypesRegex : '^on[A-Z].*' } ,
@@ -29,7 +19,16 @@ export const parameters = {
29
19
} ,
30
20
options : {
31
21
method : 'alphabetical' ,
32
- storySort : sort ,
22
+ storySort : ( a , b ) => {
23
+ //NOTE: This has to be an inline function for some reason
24
+ if ( a . title === 'Overview' ) {
25
+ return 0 ;
26
+ }
27
+ if ( b . title === 'Overview' ) {
28
+ return 1 ;
29
+ }
30
+ return a . title > b . title ;
31
+ } ,
33
32
} ,
34
33
} ;
35
34
You can’t perform that action at this time.
0 commit comments