From bbedf45ba4c2179ecc7d1b63a631c3b3ac1cbcfa Mon Sep 17 00:00:00 2001 From: MD-REHMAN Date: Fri, 29 Oct 2021 18:42:59 +0530 Subject: [PATCH] fix: fixed type script error --- src/components/primitives/Hidden/index.tsx | 1 + src/hooks/useThemeProps/usePropsResolution.tsx | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/components/primitives/Hidden/index.tsx b/src/components/primitives/Hidden/index.tsx index 473d93e46..1c3f18931 100644 --- a/src/components/primitives/Hidden/index.tsx +++ b/src/components/primitives/Hidden/index.tsx @@ -9,6 +9,7 @@ export function Hidden({ children, ...props }: IHiddenProps) { const { from, till, only, platform, colorMode } = usePropsResolution( 'Hidden', props, + {}, { ignoreProps: ['only', 'platform'], } diff --git a/src/hooks/useThemeProps/usePropsResolution.tsx b/src/hooks/useThemeProps/usePropsResolution.tsx index 24783aa2e..b2bbc2b0c 100644 --- a/src/hooks/useThemeProps/usePropsResolution.tsx +++ b/src/hooks/useThemeProps/usePropsResolution.tsx @@ -126,9 +126,9 @@ export function usePropsResolution( incomingProps: any, state?: IStateProps, config?: { - componentTheme: any; - resolveResponsively: Array; - ignoreProps: Array; + componentTheme?: any; + resolveResponsively?: string[]; + ignoreProps?: string[]; } ) { const { theme } = useNativeBase(); @@ -148,9 +148,9 @@ export const usePropsResolutionWithComponentTheme = ( incomingProps: any, state?: IStateProps, config?: { - componentTheme: any; - resolveResponsively: Array; - ignoreProps: Array; + componentTheme?: any; + resolveResponsively?: string[]; + ignoreProps?: string[]; } ) => { const modifiedPropsForSSR = useResponsiveSSRProps(incomingProps);