tw-carouser
v1.2.1
Published
'tw轮播图'
Downloads
1
Maintainers
Readme
tw-carouser
使用
$ yarn install tw-carouser
import Carousel from 'tw-carouser';
export class MyCarousel extends Component {
_renderItem = ({item, index}) => {
return (
<View style={styles.slide}>
<Text style={styles.title}>{ item.title }</Text>
</View>
);
}
render () {
return (
<Carousel
ref={(c) => { this._carousel = c; }}
data={this.state.entries}
renderItem={this._renderItem}
sliderWidth={300}
itemWidth={300}
/>
);
}
}