Skip to content

Commit

Permalink
chore: Update NeynarSigninButton component to accept presentationStyl…
Browse files Browse the repository at this point in the history
…e prop

chore: Update NeynarSigninButton component to accept presentationStyle prop
  • Loading branch information
Shreyaschorge authored Jun 4, 2024
2 parents 1d4e175 + eec995f commit 879ba99
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion react-native-sign-in-with-neynar/src/NeynarSigninButton.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from "react";
import React, { ComponentProps, useState } from "react";
import {
Text,
TouchableOpacity,
Expand Down Expand Up @@ -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<typeof Modal>["presentationStyle"];
}

export const NeynarSigninButton = ({
Expand All @@ -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 | string>(null);
Expand Down Expand Up @@ -202,6 +207,7 @@ export const NeynarSigninButton = ({
transparent={false}
visible={modalVisible}
onRequestClose={() => setModalVisible(false)}
presentationStyle={presentationStyle}
>
<SafeAreaView style={{ flex: 1 }}>
<>
Expand Down

0 comments on commit 879ba99

Please sign in to comment.