1- import { ArgTypes } from "@storybook/react" ;
1+ import { ArgTypes } from "@storybook/react-vite " ;
22import {
33 SpaceProps ,
44 LayoutProps ,
@@ -77,7 +77,7 @@ type Props = {
7777} ;
7878
7979const generateStyledSystemMarginProps = (
80- defaults : StyledSystemDefaults
80+ defaults : StyledSystemDefaults ,
8181) : ArgTypes [ ] => {
8282 return [
8383 {
@@ -843,7 +843,7 @@ const generateStyledSystemGridProps = (defaults: StyledSystemDefaults) => {
843843} ;
844844
845845const generateStyledSystemBackgroundProps = (
846- defaults : StyledSystemDefaults
846+ defaults : StyledSystemDefaults ,
847847) => {
848848 return [
849849 {
@@ -994,13 +994,13 @@ const generateStyledSystemPositionProps = (defaults: StyledSystemDefaults) => {
994994
995995const filterProps = (
996996 props : Record < string , unknown > [ ] ,
997- excludes : string [ ] = [ ]
997+ excludes : string [ ] = [ ] ,
998998) => props . filter ( ( prop ) => ! excludes . includes ( Object . keys ( prop ) [ 0 ] ) ) ;
999999
10001000const generateStyledSystemProps = (
10011001 props : StyledSystemProps ,
10021002 defaults ?: StyledSystemDefaults ,
1003- excludes ?: string [ ]
1003+ excludes ?: string [ ] ,
10041004) : ArgTypes < StyledSystemProps > => {
10051005 const {
10061006 spacing,
@@ -1019,67 +1019,76 @@ const generateStyledSystemProps = (
10191019 if ( spacing ) {
10201020 Object . assign (
10211021 result ,
1022- ...filterProps ( generateStyledSystemSpacingProps ( defaults || { } ) , excludes )
1022+ ...filterProps (
1023+ generateStyledSystemSpacingProps ( defaults || { } ) ,
1024+ excludes ,
1025+ ) ,
10231026 ) ;
10241027 }
10251028 if ( margin ) {
10261029 Object . assign (
10271030 result ,
1028- ...filterProps ( generateStyledSystemMarginProps ( defaults || { } ) , excludes )
1031+ ...filterProps ( generateStyledSystemMarginProps ( defaults || { } ) , excludes ) ,
10291032 ) ;
10301033 }
10311034 if ( padding ) {
10321035 Object . assign (
10331036 result ,
1034- ...filterProps ( generateStyledSystemPaddingProps ( defaults || { } ) , excludes )
1037+ ...filterProps (
1038+ generateStyledSystemPaddingProps ( defaults || { } ) ,
1039+ excludes ,
1040+ ) ,
10351041 ) ;
10361042 }
10371043 if ( color ) {
10381044 Object . assign (
10391045 result ,
1040- ...filterProps ( generateStyledSystemColorProps ( defaults || { } ) , excludes )
1046+ ...filterProps ( generateStyledSystemColorProps ( defaults || { } ) , excludes ) ,
10411047 ) ;
10421048 }
10431049 if ( layout ) {
10441050 Object . assign (
10451051 result ,
1046- ...filterProps ( generateStyledSystemLayoutProps ( defaults || { } ) , excludes )
1052+ ...filterProps ( generateStyledSystemLayoutProps ( defaults || { } ) , excludes ) ,
10471053 ) ;
10481054 }
10491055 if ( width ) {
10501056 Object . assign (
10511057 result ,
1052- ...filterProps ( generateStyledSystemWidthProps ( defaults || { } ) , excludes )
1058+ ...filterProps ( generateStyledSystemWidthProps ( defaults || { } ) , excludes ) ,
10531059 ) ;
10541060 }
10551061 if ( flexBox ) {
10561062 Object . assign (
10571063 result ,
1058- ...filterProps ( generateStyledSystemFlexBoxProps ( defaults || { } ) , excludes )
1064+ ...filterProps (
1065+ generateStyledSystemFlexBoxProps ( defaults || { } ) ,
1066+ excludes ,
1067+ ) ,
10591068 ) ;
10601069 }
10611070 if ( grid ) {
10621071 Object . assign (
10631072 result ,
1064- ...filterProps ( generateStyledSystemGridProps ( defaults || { } ) , excludes )
1073+ ...filterProps ( generateStyledSystemGridProps ( defaults || { } ) , excludes ) ,
10651074 ) ;
10661075 }
10671076 if ( background ) {
10681077 Object . assign (
10691078 result ,
10701079 ...filterProps (
10711080 generateStyledSystemBackgroundProps ( defaults || { } ) ,
1072- excludes
1073- )
1081+ excludes ,
1082+ ) ,
10741083 ) ;
10751084 }
10761085 if ( position ) {
10771086 Object . assign (
10781087 result ,
10791088 ...filterProps (
10801089 generateStyledSystemPositionProps ( defaults || { } ) ,
1081- excludes
1082- )
1090+ excludes ,
1091+ ) ,
10831092 ) ;
10841093 }
10851094
0 commit comments