Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Components/deck swiper #124

Merged
merged 9 commits into from
Sep 11, 2019
Merged

Components/deck swiper #124

merged 9 commits into from
Sep 11, 2019

Conversation

palingheorghe
Copy link
Collaborator

Related to #87
If anybody wants to review my code, that'd be really awesome.

How to use this component:
<DeckSwiper components={elements} />

The component takes an array of objects like the following:

const elements = [
  <View style={{ backgroundColor: 'red', height: 150, width: 150 }}>
    <Text>You wanna see some weird shit?</Text>
    <Text>Expect the worst</Text>
  </View>,
  <View style={{ backgroundColor: 'blue', height: 150, width: 150 }}>
    <Text>What did you expect?</Text>
    <Text>Nothing, you big ass weird shit</Text>
  </View>,
  <View style={{ backgroundColor: 'green', height: 150, width: 150 }}>
    <Text>Broski... Calmeaza-te... You ain't shit</Text>
    <Text>Trust me about that</Text>
  </View>,
  <View style={{ backgroundColor: 'yellow', height: 150, width: 150 }}>
    <Text>Y'all expecting to win but only one of us can really do it</Text>
    <Text>Trust me, it's gonna be me.</Text>
  </View>
];

Different props:

  • components
  • onSwipeRight
  • onSwipeLeft
  • focusedElementStyle
  • nextElementStyle
  • style

Peace! ❤️🤙🏽

@palingheorghe palingheorghe merged commit 35f40c9 into Alpha-1 Sep 11, 2019
@palingheorghe palingheorghe deleted the Components/Deck-Swiper branch September 11, 2019 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant