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

Input labelFontFamily on Custom Mapping #972

Closed
llcernicchiaro opened this issue Mar 27, 2020 · 1 comment
Closed

Input labelFontFamily on Custom Mapping #972

llcernicchiaro opened this issue Mar 27, 2020 · 1 comment
Labels
🐛 Bug 📱 Components components module-specific

Comments

@llcernicchiaro
Copy link

(First of all, sorry for my bad english)

🐛 Bug Report

I'm using custom mapping to change all project fonts. I'm using the font TitilliumWeb, and to change all components fonts I created 3 vars:

"text-font-family": "TitilliumWeb-Regular",
"text-font-family-semibold": "TitilliumWeb-SemiBold",
"text-font-family-bold": "TitilliumWeb-Bold",

Then I passed this vars to labelFontFamily on Input, DatePicker and Select components, and changed as they use the text-label-font-weight var, I changed that to "normal". So it should use "TitilliumWeb-Bold" and normal weight. On DatePicker and Select it worked, but Input label keeps using "text-font-family".

I know I can deal this using "labelStyle" prop, but I wanted to keep everything on a pattern.

To Reproduce

Custom-mapping.json:

 "strict": {
        "text-font-family": "TitilliumWeb-Regular",
        "text-font-family-semibold": "TitilliumWeb-SemiBold",
        "text-font-family-bold": "TitilliumWeb-Bold",
         ...
        "text-label-font-size": 12,
        "text-label-line-height": 16,
        "text-label-font-weight": "normal",
  }
  ...
"Input": {
           ...
            "appearances": {
                "default": {
                    "mapping": {
                        ...
                        "labelFontWeight": "text-label-font-weight",
                        "labelLineHeight": "text-label-line-height",
                        "labelFontFamily": "text-font-family-bold",
                         ...
                    },
...

Expected behavior

Like the DatePicker and Select, Input label to use the labelFontFamily.

Link to runnable example or repository (highly encouraged)

Sorry for not providing it.

UI Kitten and Eva version

Package Version
@eva-design/eva ^1.4.0
@ui-kitten/components ^4.4.0

Environment information

System:
    OS: Windows 10 10.0.18362
    CPU: (4) x64 Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz      
  Binaries:
    Node: 10.16.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.21.1 - C:\Program Files (x86)\Yarn\bin\yarn.CMD    
    npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
  IDEs:
    Android Studio: Version  3.5.0.0 AI-191.8026.42.35.6010548 
  npmPackages:
    react: 16.9.0 => 16.9.0
    react-native: 0.61.5 => 0.61.5
@artyorsh
Copy link
Collaborator

artyorsh commented Mar 27, 2020

@llcernicchiaro looks like a bug in current implementation, meaning it can't be changed with mapping. Please use labelStyle as a temporary solution

Thanks for reporting

@artyorsh artyorsh added 🐛 Bug 📱 Components components module-specific labels Mar 27, 2020
@artyorsh artyorsh mentioned this issue Apr 8, 2020
Merged
2 tasks
@artyorsh artyorsh closed this as completed Apr 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug 📱 Components components module-specific
Projects
None yet
Development

No branches or pull requests

2 participants