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
// | |
// MDL-style Checkbox component. | |
// | |
// - @see [MDL Checkbox](http://www.getmdl.io/components/index.html#toggles-section/checkbox) | |
// - [Props](#props) | |
// - [Defaults](#defaults) | |
// - [Built-in builders](#builders) | |
// | |
// Created by ywu on 15/12/13. | |
// |
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
a |
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 createLogger from 'redux-logger' | |
// Seamless-Immutable logger cleanup | |
const stateTransformer = (state) => { | |
if (typeof state === 'object' && state !== null && Object.keys(state).length) { | |
let newState = {} | |
for (var i of Object.keys(state)) { | |
if (state[i].asMutable) newState[i] = state[i].asMutable({ deep: true }) | |
else newState[i] = state[i] | |
} |
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, { PropTypes } from 'react' | |
import { Platform, View, TouchableNativeFeedback, TouchableOpacity } from 'react-native' | |
const IS_ANDROID = Platform.OS === 'android' | |
const IS_RIPPLE_EFFECT_SUPPORTED = Platform.Version >= 21 && IS_ANDROID | |
const TouchableView = ({ isRippleEnabled, children, style, ...props }) => { | |
if (IS_RIPPLE_EFFECT_SUPPORTED && !isRippleEnabled) { | |
const background = TouchableNativeFeedback.Ripple(null, false) | |
return ( |
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
/** | |
* @providesModule LoadingSpinner | |
*/ | |
import React, { ActivityIndicatorIOS, Platform, ProgressBarAndroid, StyleSheet } from 'react-native' | |
const IS_ANDROID = Platform.OS === 'android' | |
export default ({ ...props }) => IS_ANDROID | |
? <ProgressBarAndroid style={styles.spinner} {...props} /> | |
: <ActivityIndicatorIOS style={styles.spinner} {...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
// Redux navigations tore | |
{ | |
key: '1', | |
index: 0, | |
children: [{ key: 'museumList', title: 'I musei' }], | |
isDrawerOpen: false | |
} | |
// Navigation structure |
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 { find, findIndex, pullAt } from 'lodash' | |
import { actionTypes as appActionTypes } from 'reducers/appReducer' | |
export const actionTypes = { | |
CREATE_MENU_ENTRY_REQUEST: 'MENU/CREATE_MENU_ENTRY_REQUEST', | |
CREATE_MENU_ENTRY_SUCCESS: 'MENU/CREATE_MENU_ENTRY_SUCCESS', | |
CREATE_MENU_ENTRY_FAILURE: 'MENU/CREATE_MENU_ENTRY_FAILURE', | |
UPDATE_MENU_ENTRY_REQUEST: 'MENU/UPDATE_MENU_ENTRY_REQUEST', | |
UPDATE_MENU_ENTRY_SUCCESS: 'MENU/UPDATE_MENU_ENTRY_SUCCESS', | |
UPDATE_MENU_ENTRY_FAILURE: 'MENU/UPDATE_MENU_ENTRY_FAILURE', |
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, { Component, PropTypes } from 'react' | |
import { DatePickerIOS, Text, TouchableOpacity, View } from 'react-native' | |
import { noop } from 'lodash' | |
import CustomModal from '../CustomModal' | |
import styles from './CustomDatePickerIOS.style' | |
export default class CustomDatePickerIOS extends Component { | |
static propTypes = { | |
visible: PropTypes.bool, |
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, { PropTypes } from 'react' | |
import styles from './index.style.css' | |
const CustomListItem = ({ onClick, leftContent, rightContent, ...props }) => { | |
return ( | |
<div className={styles.container} onClick={onClick} {...props}> | |
<div className={styles.left}>{leftContent}</div> | |
<div className={styles.right}>{rightContent}</div> | |
</div> |
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
'use latest'; | |
/** | |
* A simple tasks that renders a page where an user can input a phone number and its recipient to send an SMS message using the Twilio APis. | |
* Please keep in mind that the following environment variables are required: | |
* TWILIO_SID: The SID token of your Twilio account | |
* TWILIO_AUTH_TOKEN: The auth token of your Twilio account | |
* TWILIO_FROM_NUMBER: The sender of the SMS (created in your Twilio account) | |
*/ |
OlderNewer