leecade / leecade/react-native-swiper

Horizonal={false} doesn't work

Open
#755 12 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
10.5k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

Which OS

Win 7 x64

Version

Which versions are you using:

  • react-native-swiper v1.5.12
  • react-native v0.54.0
Expected behaviour

Vertical swiper

Actual behaviour

Horizonal default swiper, with vertical buttons

Steps to reproduce

I've just installed RN and react-native-swiper.
This is the code of the component


import React from 'react'
import {
	Text,
	View,
	ImageBackground
} from 'react-native'
import Swiper from 'react-native-swiper'

var styles = {
	wrapper: {
	},
	slide1: {
		flex: 1,
		justifyContent: 'center',
		alignItems: 'center',
	},
	slide2: {
		flex: 1,
		justifyContent: 'center',
		alignItems: 'center',
		backgroundColor: '#97CAE5'
	},
	slide3: {
		flex: 1,
		justifyContent: 'center',
		alignItems: 'center',
		backgroundColor: '#92BBD9'
	},
	text: {
		color: '#fff',
		fontSize: 30,
		fontWeight: 'bold'
	}
}

export default () => <Swiper style={styles.wrapper} 
 horizontal={false} nextButton={<Text> next </Text>} prevButton={<Text> prev </Text>}>
	<View style={styles.slide1}>
		<ImageBackground
			source={require('./../img/slide-home1.jpg')}
			style={{ flex: 1,width: '100%', height: '100%'}}>
			<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
				<Text>Your Contents</Text>
			</View>

		</ImageBackground >
	</View>
	<View style={styles.slide2}>
		<Text style={styles.text}>Beautiful</Text>
	</View>
	<View style={styles.slide3}>
		<Text style={styles.text}>And simple</Text>
	</View>
</Swiper>

video

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the provided Swiper component with react-native-swiper v1.5.12 and React Native v0.54.0 on the reported setup, then inspect how the Swiper entry point handles the horizontal prop. Done means horizontal={false} produces vertical swiping and the supplied next and previous buttons behave consistently with that orientation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.