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

Color Style props should be typed as ColorValue, not string #3202

Open
5 of 7 tasks
sn-cuong opened this issue Aug 8, 2024 · 1 comment
Open
5 of 7 tasks

Color Style props should be typed as ColorValue, not string #3202

sn-cuong opened this issue Aug 8, 2024 · 1 comment
Assignees
Labels
bug a bug in one of the components wontfix

Comments

@sn-cuong
Copy link

sn-cuong commented Aug 8, 2024

Description

Currently in components such as Button and TouchableOpacity, the activeBackgroundColor and backgroundColor among other props used for setting the color of a visual UI element should be typed as the ColorValue type from react-native. Currently, they are typed as string types.

Related to

  • Components
  • Demo
  • Docs
  • Typings

Steps to reproduce

  1. Pass a ColorValue typed prop used for styling UI elements into activeBackgroundColor.

Expected behavior

  • backgroundColor
  • activeBackground
    props should accept "ColorValue" types from react-native.

Actual behavior

See type error Type 'ColorValue' is not assignable to type 'string | undefined'.

More Info

Screenshots/Video

Screenshot 2024-08-07 at 6 38 16 PM

Environment

  • React Native version: latest stable
  • React Native UI Lib version: latest stable

Affected platforms

  • Android
  • iOS
  • Web
@sn-cuong sn-cuong added the bug a bug in one of the components label Aug 8, 2024
@adids1221 adids1221 self-assigned this Sep 2, 2024
Copy link

stale bot commented Jan 31, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug a bug in one of the components wontfix
Projects
None yet
Development

No branches or pull requests

2 participants