From eec995f4f973a5f4c0ab69f695373a76a3b47afc Mon Sep 17 00:00:00 2001 From: Hirbod Mirjavadi Date: Tue, 4 Jun 2024 07:05:35 +0200 Subject: [PATCH] chore: Update NeynarSigninButton component to accept presentationStyle prop --- .../src/NeynarSigninButton.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/react-native-sign-in-with-neynar/src/NeynarSigninButton.tsx b/react-native-sign-in-with-neynar/src/NeynarSigninButton.tsx index 3a79be4..edd868c 100644 --- a/react-native-sign-in-with-neynar/src/NeynarSigninButton.tsx +++ b/react-native-sign-in-with-neynar/src/NeynarSigninButton.tsx @@ -1,4 +1,4 @@ -import React, { useState } from "react"; +import React, { ComponentProps, useState } from "react"; import { Text, TouchableOpacity, @@ -73,6 +73,10 @@ interface IProps { logoSize?: string; buttonStyles?: ViewStyle; textStyles?: TextStyle; + /* + * The presentation style of the Modal exported by react-native. The default is "fullScreen". + */ + presentationStyle?: ComponentProps["presentationStyle"]; } export const NeynarSigninButton = ({ @@ -97,6 +101,7 @@ export const NeynarSigninButton = ({ logoSize = "30", buttonStyles: customButtonStyle, textStyles: customTextStyle, + presentationStyle, }: IProps) => { const [modalVisible, setModalVisible] = useState(false); const [authUrl, setAuthUrl] = useState(null); @@ -202,6 +207,7 @@ export const NeynarSigninButton = ({ transparent={false} visible={modalVisible} onRequestClose={() => setModalVisible(false)} + presentationStyle={presentationStyle} > <>