Last active
October 3, 2016 18:43
How to separate Slides into module files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { | |
Link, | |
Slide, | |
Text, | |
Heading | |
} from "spectacle"; | |
var MainBody = () => { | |
return <div> | |
<Heading size={1} fit caps lineHeight={1} textColor="black"> | |
React Router | |
</Heading> | |
<Heading size={1} fit caps> | |
A ReactJS Presentation | |
</Heading> | |
<Heading size={1} fit caps textColor="black"> | |
for when your users hit the back button | |
</Heading> | |
<Link href="https://github.com/gpltaylor"> | |
<Text bold caps textColor="tertiary">brought to you by Garry Taylor</Text> | |
</Link> | |
</div> | |
} | |
//<Slide transition={["zoom"]} bgColor="primary"> | |
class MainSlide extends Slide { | |
constructor(props) { | |
super(props); | |
this.transition = ["Zoom"]; | |
this.bgColor = "primary"; | |
} | |
} | |
export default MainSlide; | |
export {MainBody}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {MainSlide, MainBody} from "./react-router/"; | |
const Main = <MainSlide> | |
<MainBody/> | |
</MainSlide> | |
var App = () => { | |
return <div> | |
<Spectacle theme={theme}> | |
<Deck transition={["zoom", "slide"]} transitionDuration={500}> | |
{React.Children.toArray([reactRouter])} | |
</Deck> | |
</Spectacle> | |
</div> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment