From 7ae16ea94f7f333835e9d597938a7c310107787a Mon Sep 17 00:00:00 2001 From: Nouman Tahir Date: Tue, 16 Mar 2021 13:11:46 +0500 Subject: [PATCH] fixed issue with keyboard hiding button in iOS --- package.json | 1 + .../snippetEditorModal/snippetEditorModal.tsx | 8 ++++---- .../snippetEditorModal/snippetEditorModalStyles.ts | 10 ++++++++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index aae00cb82..69c3d0a3f 100644 --- a/package.json +++ b/package.json @@ -80,6 +80,7 @@ "react-native-image-size": "^1.1.3", "react-native-image-zoom-viewer": "^2.2.27", "react-native-keyboard-aware-scroll-view": "^0.9.1", + "react-native-keyboard-aware-view": "^0.0.14", "react-native-linear-gradient": "^2.4.2", "react-native-matomo-sdk": "feruzm/react-native-matomo-sdk", "react-native-modal": "^11.5.6", diff --git a/src/components/snippetEditorModal/snippetEditorModal.tsx b/src/components/snippetEditorModal/snippetEditorModal.tsx index f1c21c5f5..e707c670f 100644 --- a/src/components/snippetEditorModal/snippetEditorModal.tsx +++ b/src/components/snippetEditorModal/snippetEditorModal.tsx @@ -8,6 +8,7 @@ import { addSnippet, updateSnippet } from '../../providers/ecency/ecency'; import { TextButton } from '../buttons'; import Modal from '../modal'; import styles from './snippetEditorModalStyles'; +import { KeyboardAwareView } from 'react-native-keyboard-aware-view' export interface SnippetEditorModalRef { @@ -82,7 +83,7 @@ const SnippetEditorModal = ({username, onSnippetsUpdated}: SnippetEditorModalPro const _renderContent = ( {({isDarkTheme})=>( - + - - + setShowModal(false)} @@ -133,7 +133,7 @@ const SnippetEditorModal = ({username, onSnippetsUpdated}: SnippetEditorModalPro /> - + )} ) diff --git a/src/components/snippetEditorModal/snippetEditorModalStyles.ts b/src/components/snippetEditorModal/snippetEditorModalStyles.ts index bbab27b98..507be599c 100644 --- a/src/components/snippetEditorModal/snippetEditorModalStyles.ts +++ b/src/components/snippetEditorModal/snippetEditorModalStyles.ts @@ -7,7 +7,7 @@ export default EStyleSheet.create({ backgroundColor: '$primaryBackgroundColor', margin:0, paddingTop:32, - paddingBottom:24 + paddingBottom:8 }, container:{ flex:1, @@ -50,5 +50,11 @@ export default EStyleSheet.create({ borderRadius:16, justifyContent:'center', alignItems:'center' - } as ViewStyle + } as ViewStyle, + actionPanel:{ + flexDirection:'row', + justifyContent:'flex-end', + alignItems:'center', + marginBottom:16 + } as ViewStyle, }) \ No newline at end of file