1.0.5 • Published 5 years ago
react-native-list-gallery v1.0.5
React Native List Gallery ·
Props
Name | Type | default | Description |
---|---|---|---|
animated | bool | true | Allow automatic gallery swaping |
containerStyle | object | {} | styling the main continer |
data | array | default | Description |
delay | intger | 5000 | animating slid delay in milisconds if animated true |
renderItem | function | () => void | -- |
Examples
TODO
Usage
import React from 'react';
import ListGallery from 'react-native-list-gallery';
function renderImage({ url }) {
return <Image source={{ uri: url }} />;
}
// gallery component
function HelloImageGallery() {
return (
<ListGallery
animated
data={[
{ url: 'http://placeimg.com/920/480/any' },
{ url: 'http://placeimg.com/920/480/any' },
{ url: 'http://placeimg.com/920/480/any' },
{ url: 'http://placeimg.com/920/480/any' }
]}
delay={3000}
renderItem={renderImage}
/>
);
}