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

Documentation Bug: Provided Example mapping.json Creates Type error #1838

Open
rotto32 opened this issue Dec 6, 2024 · 0 comments
Open

Documentation Bug: Provided Example mapping.json Creates Type error #1838

rotto32 opened this issue Dec 6, 2024 · 0 comments

Comments

@rotto32
Copy link

rotto32 commented Dec 6, 2024

🐛 Bug Report

Documentation Bug:
In the 5.3.0 docs, in Guides-> Branding, in the mapping example, the guide prompts you to create a mapping.json file with the following contents:
{ "strict": { "text-font-family": "OpenSans-Regular" } }

And then to pass the map into the Application Provider like so: <ApplicationProvider {...eva} theme={{ ...eva.dark, ...theme }} customMapping={mapping}>

However this throws a type error for the customMapping prop.

Instead, I used the following code in mapping.json to no longer get a type error:
{ "components": {}, "strict": { "text-font-family": "OpenSans-Regular" } }

Additional details: Happening in a raw (non-expo) React Native repo that is brand new that has installed the latest version of eva and UI Kitten.

To Reproduce

Steps to reproduce the behavior:
Follow steps in the Doc Guide to create a map for fonts. Although for the npx react-native link step I get an error (I created a different issue for that) and used npx react-native-asset instead.

Expected behavior

Rather than have the copy and paste example throw a type error, update the example to no longer cause a type error.

Link to runnable example or repository (highly encouraged)

UI Kitten and Eva version

Package Version
@eva-design/eva 2.2.0
@ui-kitten/components 5.3.1

Environment information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant