react-native-instagram-login icon indicating copy to clipboard operation
react-native-instagram-login copied to clipboard

Adding types

Open MrShtrahman opened this issue 3 years ago • 2 comments

Hi, this project is pretty nice :)

I think that changing it to typescript and adding types would make this project even better

MrShtrahman avatar May 14 '22 11:05 MrShtrahman

I dont have much time to do it. Feel free to create a pull request. I really appreciate it.

hungdev avatar May 14 '22 11:05 hungdev

Hi everyone, add to declarations.d.ts

declare module 'react-native-instagram-login' {
  import * as React from 'react'

  interface InstagramLoginProps {
    ref: React.RefObject<any>
    appId: string
    appSecret: string
    redirectUrl: string
    scopes: string[]
    onLoginSuccess?: (data?: { access_token: string; user_id: number }) => void
    onLoginFailure?: (error: string) => void
    modalVisible?: boolean
    responseType?: string
    containerStyle?: object
    wrapperStyle?: object
    closeStyle?: object
  }

  export default class InstagramLogin extends React.Component<InstagramLoginProps> {}
}

UmidbekU avatar Sep 27 '22 16:09 UmidbekU