Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
react-native-simple-slideshow
Advanced tools
A quick and easy slideshow for react native. (Android & iOS)
yarn add react-native-simple-slideshow
import Slideshow from 'react-native-simple-slideshow';
// ...
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' }
]}/>
);
}
export default class SlideshowTest extends Component {
constructor(props) {
super(props);
this.state = {
position: 1,
interval: null,
dataSource: [
{
title: 'Title 1',
caption: 'Caption 1',
url: 'http://placeimg.com/640/480/any',
}, {
title: 'Title 2',
caption: 'Caption 2',
url: 'http://placeimg.com/640/480/any',
}, {
title: 'Title 3',
caption: 'Caption 3',
url: 'http://placeimg.com/640/480/any',
},
],
};
}
componentWillMount() {
this.setState({
interval: setInterval(() => {
this.setState({
position: this.state.position === this.state.dataSource.length ? 0 : this.state.position + 1
});
}, 2000)
});
}
componentWillUnmount() {
clearInterval(this.state.interval);
}
render() {
return (
<Slideshow
dataSource={this.state.dataSource}
position={this.state.position}
onPositionChanged={position => this.setState({ position })} />
);
}
}
Property | Type | isRequired? | Default | Description |
---|---|---|---|---|
dataSource | bool | required | - | slideshow data |
height | number | optional | 200 | container height |
position | number | optional | - | set position slideshow |
scrollEnabled | bool | optional | true | enable / disable scrolling |
overlay | bool | optional | false | background overlay |
indicatorSize | number | optional | 16 | indicator size |
indicatorColor | string | optional | #CCCCCC | indicator color |
indicatorSelectedColor | string | optional | #FFFFFF | indicator selected color |
arrowSize | number | optional | 16 | arrow size |
arrowLeft | object | optional | - | component arrow left |
arrowRight | object | optional | - | component arrow right |
onPress | func | optional | - | returns an object image and index of image pressed |
onPositionChanged | func | optional | - | called when the current position is changed |
containerStyle | object | optional | - | custom styles for container |
// example data structure
dataSource: [
{
title: 'title 1',
caption: 'caption 1',
url: 'url 1',
}, {
title: 'title 1',
caption: 'caption 1',
url: 'url 2',
},
]
Property | Type | Description |
---|---|---|
title | string | title |
caption | string | caption |
url | string / number | image (URL or a local file resource) |
Originally created by @haqiqi, modified by @dudynskyi.
MIT
FAQs
A quick and easy slideshow for react native.
The npm package react-native-simple-slideshow receives a total of 0 weekly downloads. As such, react-native-simple-slideshow popularity was classified as not popular.
We found that react-native-simple-slideshow demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.