File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
src/components/composites Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -31,20 +31,25 @@ const AspectView = forwardRef((props: any, ref?: any) => {
31
31
} ) ;
32
32
33
33
const AspectRatio = ( props : IAspectRatioProps , ref ?: any ) => {
34
- const { style, ratio, children, ...resolvedProps } = usePropsResolution (
34
+ const {
35
+ style,
36
+ ratio,
37
+ children = < > </ > ,
38
+ ...resolvedProps
39
+ } = usePropsResolution (
35
40
'AspectRatio' ,
36
41
props ,
37
42
{ } ,
38
43
{ resolveResponsively : [ 'ratio' ] }
39
44
) ;
40
45
let computedStyle : ViewStyle | undefined = style ;
41
- let newChildWithProps = React . cloneElement (
46
+ const newChildWithProps = React . cloneElement (
42
47
children ,
43
48
{
44
- ...children . props ,
49
+ ...children ? .props ,
45
50
style : StyleSheet . absoluteFillObject ,
46
51
} ,
47
- children . props . children
52
+ children ? .props ? .children
48
53
) ;
49
54
50
55
//TODO: refactor for responsive prop
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ const IconButton = (
20
20
isPressed : isPressedProp ,
21
21
isFocused : isFocusedProp ,
22
22
isFocusVisible : isFocusVisibleProp ,
23
+ isDisabled,
23
24
...props
24
25
} : IIconButtonProps ,
25
26
ref : any
@@ -43,6 +44,7 @@ const IconButton = (
43
44
isPressed : isPressedProp || isPressed ,
44
45
isFocused : isFocusedProp || isFocused ,
45
46
isFocusVisible : isFocusVisibleProp || isFocusVisible ,
47
+ isDisabled,
46
48
} ) ;
47
49
48
50
let clonedIcon ;
You can’t perform that action at this time.
0 commit comments