Kirankumar Dafda
Kirankumar Dafda

Reputation: 2384

How to use custom arrow using Arrow Left and Arrow Right - React Native slideshow

I am using this plugin in react native, where i need to use custom arrow or text arrow just like < and > but i am not getting what the below type to use arrowLeft and arrowRight so, Is there any example for Arrow Left and Arrow Right

arrowLeft | object | optional | - | component arrow left

arrowRight | object | optional | - | component arrow right

Upvotes: 0

Views: 1552

Answers (1)

Manjeet Singh
Manjeet Singh

Reputation: 4572

you simple can pass any component in that i.e.

import Slideshow from 'react-native-slideshow';
import {Image} from 'react-native'

// ...

render() {
  return (
    <Slideshow 
      dataSource={[
        { url:'http://placeimg.com/640/480/any' },
        { url:'http://placeimg.com/640/480/any' },
        { url:'http://placeimg.com/640/480/any' }
    ]}
    arrowLeft={<Image source={require(PATH_TO_LEFT_ICON)}/>}
    arrowRight={<Image source={require(PATH_TO_RIGHT_ICON)}/>}/>
  );
}

**I used Image as the component, you can use whatever you want. and now you are good to go.

Upvotes: 1

Related Questions