torgeadelin / react-native-animated-nav-tab-bar

A simple and customisable React Native component that implements an animated bottom tab bar for React Navigation.
MIT License
889 stars 102 forks source link

Expected style "fontSize: 14" to contain units warning from styled components #112

Closed rahmanharoon closed 2 years ago

rahmanharoon commented 2 years ago

Here is the warning message which comes from styled components

Expected style "fontSize: 14" to contain units  at StyledNativeComponent

Simulator Screen Shot - iPhone 12 mini - 2022-01-05 at 16 27 48

duongquang1611 commented 2 years ago

I added the 'px' suffix after the fontSize in the file node_modules/react-native-animated-nav-tab-bar/dist/lib/index.js (line 193) and the warning was gone. Here is the code after adding

var Label = Styled__default["default"](reactNative.Animated.Text)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n\tfontSize: ", "px;\n\tcolor: ", ";\n\tmargin-left: ", "px;\n"], ["\n\tfontSize: ", "px;\n\tcolor: ", ";\n\tmargin-left: ", "px;\n"])), function (p) {
torgeadelin commented 2 years ago

Fixed, please update to 3.1.8