akveo / react-native-ui-kitten

:boom: React Native UI Library based on Eva Design System :new_moon_with_face::sparkles:Dark Mode
https://akveo.github.io/react-native-ui-kitten/
MIT License
10.26k stars 951 forks source link

wrong mapping for 'textFontSize' property in button component #1531

Open whitestranger7 opened 2 years ago

whitestranger7 commented 2 years ago

šŸ› Bug Report

When using Button component, mapping provide textFontSize for setting up fontSize for text inside button. Yet, looks like mappings doesn't work for this particular property. When trying to set up different textFontSize - it's always applies default value, which if 16.

It should work, since textFontSize gets from eva mapping here. But that value always returns 16.

Might related to eva package instead!

To Reproduce

Steps to reproduce the behavior: Create button component and try to modify mapping by changing textFontSize. Get button element ref and check what value eva returns

Screenshot 2021-10-11 at 02 11 43 Screenshot 2021-10-10 at 22 58 13

Expected behavior

Mapping should get correct value.

UI Kitten and Eva version

Package Version
@eva-design/eva 2.1.0
@ui-kitten/components 5.1.0

Environment information

  System:
    OS: macOS 11.1
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  Binaries:
    Node: 14.15.4 - ~/.nvm/versions/node/v14.15.4/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 7.14.0 - ~/.nvm/versions/node/v14.15.4/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
    Android SDK:
      API Levels: 28, 29, 30
      Build Tools: 28.0.3, 29.0.2, 30.0.3
      System Images: android-23 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom
  IDEs:
    Android Studio: 4.2 AI-202.7660.26.42.7322048
    Xcode: 12.5/12E262 - /usr/bin/xcodebuild
  npmPackages:
    react: 17.0.1 => 17.0.1 
    react-native: 0.64.0 => 0.64.0
dVaytul commented 2 years ago

@whitestranger7, The bug is caused by React.cloneElement inside commit. same issue

greenfrvr commented 1 year ago

@whitestranger7 @dVaytul are you guys sure the problem is in mappings? for me it looks that size variant just overrides that font size that you declared in status variant group. I think that behaviour is defined by order of variant groups, so the latest one applied can override values of previously applied variants.

can you share more details on this issue?