Skip to content

Instantly share code, notes, and snippets.

@loraxx753
Created July 28, 2018 00:34
Show Gist options
  • Save loraxx753/851f6ad75ec4d660588e918db0c024be to your computer and use it in GitHub Desktop.
Save loraxx753/851f6ad75ec4d660588e918db0c024be to your computer and use it in GitHub Desktop.
import React from 'react'
import { Deck, Slide, Text } from 'spectacle'
const FirstSlide = props => {
return (
<Slide>
<Text>Hello there {props.key}.</Text>
<Text>Ready?</Text>
</Slide>
)
}
const SecondSlide = props => {
return (
<Slide {...props}>
<Text>Hello there {props.key}.</Text>
<Text>Steady...</Text>
</Slide>
)
}
export const slides = [
FirstSlide,
SecondSlide,
props => {
return (
<Slide>
<Text>Hello there {props.key}.</Text>
<Text>Let's rock.</Text>
</Slide>
)
}
]
export default props => (
<Deck>
{slides.map((Slide, i) => Slide({ key: i, last: !(i <= slides.length) }))}
</Deck>
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment