Horizontal timeline with cute hover transition
Forked from Charlotte Dann's Pen Timeline.
A Pen by Carlos Perez on CodePen.
| var LoginWithTwitter = React.createClass({ | |
| getInitialState: function() { | |
| return {loggedIn: false}; | |
| }, | |
| login: function (e) { | |
| var that = this; | |
| Meteor.loginWithTwitter(function() { | |
| that.setState({ loggedIn: true }); | |
| }); |
Horizontal timeline with cute hover transition
Forked from Charlotte Dann's Pen Timeline.
A Pen by Carlos Perez on CodePen.
| <snippet> | |
| <content><![CDATA[ | |
| import React from "react"; | |
| import styles from "./style"; | |
| class ${1:Component} extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| } |
| #/bin/sh | |
| # author: perezpriego | |
| # This shell script creates the basic architecture of a react-component | |
| mkdir -p $1 | |
| cd $1 | |
| touch styles.scss index.jsx | |
| cat > index.jsx <<DELIM | |
| import React from "react"; | |
| import styles from "./style"; |
| // Prop passing Shorthands for Styled-components | |
| export const borderProps = props => css` | |
| ${props.borderBottom && `border-bottom: ${props.borderWidth || "1px"} solid ${color.border}`}; | |
| ${props.borderTop && `border-top: ${props.borderWidth || "1px"} solid ${color.border}`}; | |
| ${props.borderLeft && `border-left: ${props.borderWidth || "1px"} solid ${color.border}`}; | |
| ${props.borderRight && `border-right: ${props.borderWidth || "1px"} solid ${color.border}`}; | |
| `; | |
| export const marginProps = props => css` | |
| ${props.marginBottom && `margin-bottom: ${typeof (props.marginBottom) === "string" ? props.marginBottom : "1em"}`}; |
| <body class="scenery"> | |
| <section class="scenery__sky"> | |
| <div class="sky [sky--dusk / sky--daytime] [sky--foggy]"> | |
| <div class="sky__clouds"></div> | |
| <div class="sky__sun"></div> | |
| </div> | |
| </section> | |
| <section class="scenery__ground"></section> | |
| <section class="scenery__people"></section> | |
| </body> |
| @import '~tools/theme'; | |
| :local(.root) { | |
| border: 1px solid; | |
| font-family: inherit; | |
| font-size: 12px; | |
| color: inherit; | |
| background: none; | |
| cursor: pointer; | |
| display: inline-block; |
| import React from "react" | |
| import Button from "components/core/button" | |
| const = Component = () => <Button theme={ Button.theme.secondary }>Some Button</Button> | |
| export default Component |