React-native-ui-kitten: Switch custom mapping when user click button

Created on 11 Feb 2020  路  3Comments  路  Source: akveo/react-native-ui-kitten

馃挰 Question

I want to change customized mapping component whenever the user click button but the mapping property seem to work only once idk what to do anybody know?

UI Kitten and Eva version

| Package | Version |
| ----------- | ----------- |
| @eva-design/eva | |
| @ui-kitten/components | |

Help wanted

Most helpful comment

@sovannvin Officially - no, but you can put custom variable into your theme object, e.g:

font-1-theme.js:

{ "font-family-variable-name": "font-1" }

Same for the second theme

And then use the name of this variable in your custom mapping (I'm not sure but you may need to replace all text-font-family variables with font-family-variable-name

Use it on own risk, because this is not official way of doing such customization :)

All 3 comments

You're not able to do this during the runtime. Prefer using themes in order to do this

You're not able to do this during the runtime. Prefer using themes in order to do this

Well, I just want to switch text font but can I use it using them ?

@sovannvin Officially - no, but you can put custom variable into your theme object, e.g:

font-1-theme.js:

{ "font-family-variable-name": "font-1" }

Same for the second theme

And then use the name of this variable in your custom mapping (I'm not sure but you may need to replace all text-font-family variables with font-family-variable-name

Use it on own risk, because this is not official way of doing such customization :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sarmadkung picture sarmadkung  路  3Comments

sobiso picture sobiso  路  3Comments

bkwhite picture bkwhite  路  3Comments

RWOverdijk picture RWOverdijk  路  3Comments

eyalyoli picture eyalyoli  路  3Comments