NativeBase icon indicating copy to clipboard operation
NativeBase copied to clipboard

Custom Theme Type Warning

Open sanna231 opened this issue 2 years ago • 1 comments

Description

So I’m creating a custom theme object for NativeBase and inside of it I am adding some extra properties like “backgroundColor”. Later when accessing these properties through useTheme() the code works, but I get a type warning. Is there a way to silence them? In reality the prop is there and my code works absolutely fine.. its only a type warning.

CodeSandbox/Snack link

NA

Steps to reproduce

  1. Go to '...'
  2. Click on '...'
  3. Scroll down to '...'
  4. See error

NativeBase Version

3.4.9

Platform

  • [X] Android
  • [X] CRA
  • [X] Expo
  • [X] iOS
  • [X] Next

Other Platform

No response

Additional Information

No response

sanna231 avatar Jul 27 '22 10:07 sanna231

Hey @sanna231, Thanks for reporting the issue. We'll look into it.

ankit-tailor avatar Aug 09 '22 06:08 ankit-tailor

This issue is fixed in version 3.4.6 or later. @sanna231 Can you please have look at this documentation for typing custom theme https://docs.nativebase.io/typescript? Please feel free to reopen.

surajahmed avatar Sep 12 '22 10:09 surajahmed