A Pen by Sonny Lazuardi on CodePen.
Created
December 22, 2015 18:05
-
-
Save sonnylazuardi/2cedbb5a700cf50003fd to your computer and use it in GitHub Desktop.
JGKmGE
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
<div id="root">Loading Comic...</div> | |
<script src="https://fb.me/react-with-addons-0.14.3.min.js"></script> | |
<script src="https://fb.me/react-dom-0.14.3.min.js"></script> | |
<script src="http://sonnylazuardi.github.io/react-komik/dist/komik.js"></script> |
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
let { Panel, Character, Balloon, Strip } = Komik; | |
let imageURL = 'http://sonnylazuardi.github.io/react-komik/dist/'; | |
let Comic = (props) => ( | |
<Strip title="React Komik!" column="2"> | |
<Panel fill="#c8eafb"> | |
<Character | |
image={`${imageURL}char1.png`} | |
scale="0.5"> | |
<Balloon | |
left="-80" | |
height="120" | |
image={`${imageURL}chat_left.svg`} | |
text="Have you heard about ReactJS? You can write HTML in JS..."/> | |
</Character> | |
</Panel> | |
<Panel fill="#c8eafb"> | |
<Character | |
image={`${imageURL}char2.png`} | |
scale="0.48"> | |
<Balloon | |
height="153" | |
left="40" | |
bottom="-40" | |
image={`${imageURL}chat_right.svg`} | |
text="Yeah it's pretty cool. You can use JSX to write web, mobile, TV app, and presentations" | |
/> | |
</Character> | |
</Panel> | |
<Panel fill="#c8eafb"> | |
<Character | |
image={`${imageURL}char1_hype.png`} | |
scale="0.45"> | |
<Balloon | |
height="130" | |
left="-70" | |
image={`${imageURL}chat_left.svg`} | |
text="Hey look! It's React Komik! We can create this comic strip with ReactJS!" | |
/> | |
</Character> | |
<Character | |
image={`${imageURL}logo_small.png`} | |
top="20" | |
left="130" | |
scale="1" | |
/> | |
</Panel> | |
<Panel background={`${imageURL}magic.jpg`} /> | |
</Strip> | |
); | |
ReactDOM.render(<Comic />, document.getElementById('root')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment