Custom local svg is not showing in BotttomNavigation - How to pass it in routes icon #3129
-
I have a local svg file but when I put it as a component in routes icon it is not getting rendered.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I solved it using the renderIcon prop, I passed all the icons through a renderIcon function.
|
Beta Was this translation helpful? Give feedback.
I solved it using the renderIcon prop, I passed all the icons through a renderIcon function.
const renderIcon = BottomNavigation.SceneMap({ purchases: PurchaseIcon, sales: SalesIcon, tools: ToolsIcon, apps: AppsIcon, settings: SettingsIcon })
Where
PurchaseIcon
wasconst PurchaseIcon = () => <PurchasesLogo/>
and the others like SalesIcon,..etc was similar to this.