Skip to content

Commit cc99f00

Browse files
committed
Merge branch 'patch' of github.com:GeekyAnts/NativeBase into patch
2 parents a5087c6 + e56447a commit cc99f00

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

src/components/composites/AspectRatio/index.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,25 @@ const AspectView = forwardRef((props: any, ref?: any) => {
3131
});
3232

3333
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(
3540
'AspectRatio',
3641
props,
3742
{},
3843
{ resolveResponsively: ['ratio'] }
3944
);
4045
let computedStyle: ViewStyle | undefined = style;
41-
let newChildWithProps = React.cloneElement(
46+
const newChildWithProps = React.cloneElement(
4247
children,
4348
{
44-
...children.props,
49+
...children?.props,
4550
style: StyleSheet.absoluteFillObject,
4651
},
47-
children.props.children
52+
children?.props?.children
4853
);
4954

5055
//TODO: refactor for responsive prop

src/components/composites/IconButton/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const IconButton = (
2020
isPressed: isPressedProp,
2121
isFocused: isFocusedProp,
2222
isFocusVisible: isFocusVisibleProp,
23+
isDisabled,
2324
...props
2425
}: IIconButtonProps,
2526
ref: any
@@ -43,6 +44,7 @@ const IconButton = (
4344
isPressed: isPressedProp || isPressed,
4445
isFocused: isFocusedProp || isFocused,
4546
isFocusVisible: isFocusVisibleProp || isFocusVisible,
47+
isDisabled,
4648
});
4749

4850
let clonedIcon;

0 commit comments

Comments
 (0)