Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding types #111

Open
MrShtrahman opened this issue May 14, 2022 · 2 comments
Open

Adding types #111

MrShtrahman opened this issue May 14, 2022 · 2 comments

Comments

@MrShtrahman
Copy link

Hi, this project is pretty nice :)

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

@hungdev
Copy link
Owner

hungdev commented May 14, 2022

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

@UmidbekU
Copy link

UmidbekU commented Sep 27, 2022

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> {}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants