Commit d976239 1 parent af767e2 commit d976239 Copy full SHA for d976239
File tree 3 files changed +4
-13
lines changed
e2e/e2e-app/src/components/default-props
packages/core/src/generators/vue
3 files changed +4
-13
lines changed Original file line number Diff line number Diff line change 1
1
import { useDefaultProps , useStore } from '@builder.io/mitosis' ;
2
- import { DefaultPropsState , DefaultPropsType } from './types' ;
3
2
4
- useDefaultProps < DefaultPropsType > ( { foo : 'abc' , bar : 'foo' } ) ;
3
+ useDefaultProps ( { foo : 'abc' , bar : 'foo' } ) ;
5
4
6
- export default function DefaultProps ( props : DefaultPropsType ) {
7
- const state = useStore < DefaultPropsState > ( {
5
+ export default function DefaultProps ( props : any ) {
6
+ const state = useStore ( {
8
7
getProps : ( ) => {
9
8
return JSON . stringify ( { foo : props . foo , bar : props . bar } ) ;
10
9
} ,
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ const getCompositionPropDefinition = ({
20
20
let str = 'const props = ' ;
21
21
22
22
if ( component . defaultProps ) {
23
- const generic = isTs ? `<${ component . propsTypeRef } >` : '' ;
23
+ const generic = isTs && component . propsTypeRef !== 'any' ? `<${ component . propsTypeRef } >` : '' ;
24
24
const defalutPropsString = props
25
25
. map ( ( prop ) => {
26
26
const value = component . defaultProps ! . hasOwnProperty ( prop )
You can’t perform that action at this time.
0 commit comments