const StyledIcon = styled(Icon)``;
export const HomeIcon = () => <StyledIcon uri="icn-home.svg" />;
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 * as N from 'react-native'; | |
import styled from 'styled-components'; | |
import { | |
compose, | |
space, | |
color, | |
layout, | |
typography, | |
flexbox, |
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 PropTypes from 'prop-types'; | |
import debounce from 'lodash/debounce'; | |
class OnChangeDebounce extends React.Component{ | |
constructor(props){ | |
super(props); | |
this.isValueSourceProps = this.props.hasOwnProperty(this.props.valueProperty); | |
this._createDebounceFunction(props); | |
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'; | |
const PostList = ({posts}) => ( | |
<div> | |
<ul> | |
{posts.map(post => ( | |
<li key={post._id}> | |
<a href={`/post/${post._id}`}>{post.title}</a> | |
</li> | |
))} |
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 {FlowRouter} from 'meteor/kadira:flow-router'; | |
import {mount} from 'react-mounter'; | |
import MainLayout from '/client/modules/core/components/layout.main.jsx'; | |
import PostList from '/client/modules/core/containers/postlist'; | |
import Post from '/client/modules/core/containers/post'; | |
import NewPost from '/client/modules/core/containers/newpost'; | |
export default function (injectDeps) { |
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
/** @jsx React.DOM */ | |
'use strict'; | |
// Components wrapping Twitter Bootstrap stuff | |
// | |
var BSNames = { | |
// This isn't exhaustive. Need to think through what should go here. Should | |
// be exclusive. | |
bsClass: {'column': 'col', 'button': 'btn', 'btn-group': 'btn-group', 'label': 'label', |
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
/** @jsx React.DOM */ | |
var BootstrapModalMixin = function() { | |
var handlerProps = | |
['handleShow', 'handleShown', 'handleHide', 'handleHidden'] | |
var bsModalEvents = { | |
handleShow: 'show.bs.modal' | |
, handleShown: 'shown.bs.modal' | |
, handleHide: 'hide.bs.modal' |
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
fun List<Int>.swap(x : Int, y : Int) { | |
val tmp = this[x] // 'this' corresponds to the list | |
this[x] = this[y] | |
this[y] = tmp | |
} |