Agontuk / react-native-collapsible-toolbar

Pure JS based collapsible toolbar for react native on Android and iOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

local imageSource

odesey opened this issue · comments

commented

Is there anyway to use a local file ie require("../../../app/images/my_image.png") for the image source prop? I've tried the following:

require("../../../app/images/my_image.png")
("../../../app/images/my_image.png")
"../../../app/images/my_image.png"

None of those seem to work.

Thanks.

you can use the renderToolBar prop to render your local image like this -

renderToolBar={() => <Image source={require('../img.jpg')} />}