From 2e8536b3145c65e7f94ad2ea5431f7760d1206b2 Mon Sep 17 00:00:00 2001 From: Viraj-10 Date: Mon, 30 May 2022 16:25:33 +0530 Subject: [PATCH 1/9] fix: usekeyboard-bottom-inset --- src/utils/useKeyboardBottomInset.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/useKeyboardBottomInset.ts b/src/utils/useKeyboardBottomInset.ts index 7d94b56ff..0a9e8e3f2 100644 --- a/src/utils/useKeyboardBottomInset.ts +++ b/src/utils/useKeyboardBottomInset.ts @@ -9,7 +9,7 @@ export const useKeyboardBottomInset = () => { function onKeyboardChange(e: KeyboardEvent) { if ( e.startCoordinates && - e.endCoordinates.screenY < e.startCoordinates.screenY + e.endCoordinates.screenY <= e.startCoordinates.screenY ) setBottom(e.endCoordinates.height / 2); else setBottom(0); From 779b0d9d93b9914aa29a088cec550e279ac49939 Mon Sep 17 00:00:00 2001 From: Viraj-10 Date: Mon, 30 May 2022 19:23:04 +0530 Subject: [PATCH 2/9] fix: button specific prop fix fab --- src/components/composites/Fab/Fab.tsx | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/components/composites/Fab/Fab.tsx b/src/components/composites/Fab/Fab.tsx index f3a5df0cf..5e340a50a 100644 --- a/src/components/composites/Fab/Fab.tsx +++ b/src/components/composites/Fab/Fab.tsx @@ -4,9 +4,23 @@ import type { IFabProps } from './types'; import { usePropsResolution } from '../../../hooks/useThemeProps'; import { OverlayContainer } from '@react-native-aria/overlays'; import { useHasResponsiveProps } from '../../../hooks/useHasResponsiveProps'; +import { extractInObject } from '../../../theme/tools/utils'; + +const Fab = ({ ...props }: IFabProps, ref: any) => { + /** Extracting Button Specific Props */ + const [buttonProps, remainingProps] = extractInObject(props, [ + 'variant', + '_pressed', + '_hover', + '_text', + '_focus', + '_stack', + '_loading', + '_disabled', + '_spinner', + ]); + const themeProps = usePropsResolution('FAB', remainingProps); -const Fab = ({ variant, ...props }: IFabProps, ref: any) => { - const themeProps = usePropsResolution('FAB', props); const { label, icon, @@ -18,7 +32,7 @@ const Fab = ({ variant, ...props }: IFabProps, ref: any) => { const fabComponent = (