react-native-ui-kitten
react-native-ui-kitten copied to clipboard
type issue with meta in customMapping for eva in ApplicationProvider
🐛 Bug Report
customMapping is requiring all fields in meta to be filled
To Reproduce
use typescript with UI kitten
Expected behavior
I expected these examples to work https://akveo.github.io/react-native-ui-kitten/docs/design-system/customize-mapping#change-a-single-parameter
but sadly had to tinker with /node_modules/@eva-design/dss/types/schema.d.ts and change the fields in the meta field to make them optional so that the examples could work
UI Kitten and Eva version
| Package | Version | | ----------- | 5.0.0| | @eva-design/eva | | | @ui-kitten/components | |
it can be easily fixed with this
export interface ControlMetaType {
scope?: ScopeMetaType;
parameters?: {
[key: string]: PropertyMetaType;
};
appearances?: {
[key: string]: AppearanceMetaType;
};
variantGroups?: {
[key: string]: {
[key: string]: VariantMetaType;
};
};
states?: {
[key: string]: StateMetaType;
};
}
Same issue here. It there any fix foreseen @artyorsh ? 🙏
Current workaround, but I'm not sure what are the side effects of setting empty meta
info):
{
"components": {
"Button": {
"meta": {
"scope": "all", // <---
"parameters": {}, // <---
"appearances": {}, // <---
"variantGroups": {}, // <---
"states": {} // <---
},
"appearances": {
"filled": {
"mapping": {},
"variantGroups": {
"status": {
"primary": {
"textColor": "$color-basic-1000"
}
}
}
}
}
}
}
}
Any fixes for this?
Any fixes for this?
I ended up building my own components library so I have no clue... sorry
Hello there,
In our documentation we provide example for one example, by default you need specify meta for all of your types.
Regards, Vlad