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

textStyle prop not working. Also cannot find type declarations #98

Open
ahnafnafee opened this issue Feb 5, 2022 · 6 comments
Open

Comments

@ahnafnafee
Copy link

ahnafnafee commented Feb 5, 2022

Using version v1.0.8.

<UserAvatar
      size={90}
      name={`${card.firstName} ${card.lastName}`}
      src={card.profilePicUrl}
      borderRadius={90 / 2}
      style={{
          borderColor: "#00A5B9",
          borderWidth: 3,
      }}
      textStyle={{
          fontFamily: 'OpenSans-Bold',
          fontSize: 20,
      }}
/>

Referred to these two issues first (#62 and #60 ) where it was mentioned it was resolved in v1.0.8 but I am still getting the issue.

Here's how the types are referenced in package.json for react-native-user-avatar in v1.0.8

"react-native": "src/index.js",
  "types": "lib/typescript/src/index.d.ts",
  "files": [
    "lib/",
    "src/"
  ],
@avishayil
Copy link
Owner

Thanks @ahnafnafee, working on a fix

@jay-jlm
Copy link

jay-jlm commented Mar 3, 2022

+1

@alexanderdavide
Copy link

Any news? Sadly, this issue still exists.

@lhr000lhr
Copy link

any update?

@DonBrowny
Copy link

As a temporary fix for typescript add the code mention in the comment - #60 (comment) to an index.d.ts file and refer it in you tsconfig.json file.
For example I have create file with the above code in src/types/libs/react-native-user-avatar/index.d.ts and added it to to tsconfig as shown below

"compilerOptions": {
    "strict": true,
    "paths": {
      "*": [ "./src/types/libs/*"]
    }
  }

@brunofray
Copy link

any update to textStyle?

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

7 participants