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
<CircleTransition | |
ref={circle => this.circleTransition = circle} | |
color={‘blue’} | |
expand={true} | |
callback={() => { | |
// change the scene here. the callback will be called before the circle is hidden | |
}} | |
/> |
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
handlePress () { | |
this.circleTransition.start() | |
} |
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
handlePress () { | |
this.circleTransition.start() | |
} |
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-native' | |
import React from 'react' | |
import CircleTransition from '../CircleTransition.js' | |
// Note: test renderer must be required after react-native. | |
import renderer from 'react-test-renderer' | |
const positionTest = (position) => { | |
const tree = renderer.create( | |
<CircleTransition |
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 | |
} from 'react' | |
import { | |
AppRegistry, | |
Easing, | |
StyleSheet, | |
Text, | |
Image, |
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 | |
} from 'react' | |
import { | |
AppRegistry, | |
Easing, | |
StyleSheet, | |
Text, | |
Image, |
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 {Dimensions} from 'react-native' | |
const {width, height} = Dimensions.get('window') | |
const calculateFontSizeForAScreenSizePercentage = (percentage) => { | |
return Math.sqrt((width * width) + (height * height)) * (percentage / 100) | |
} | |
const baseUnit = calculateFontSizeForAScreenSizePercentage(2.5) | |
const em = (value) => { |
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 update from 'immutability-helper'; | |
import {cloneDeep} from 'lodash'; | |
const selectedChoice = {isChosen: true}; | |
const choices = [selectedChoice, selectedChoice, selectedChoice]; | |
const options = {choices: choices}; | |
const selectedOptions = [options, options]; | |
const OPTION_INDEX = 0; | |
const CHOICE_INDEX = 1; |
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 { ACTION_TYPES } from '../actions/branchActions'; | |
const { | |
NEAREST_BRANCH_SUCCESS, | |
NEAREST_BRANCH_REQUEST, | |
NEAREST_BRANCH_FAILURE | |
} = ACTION_TYPES; | |
export const INITIAL_STATE = { searching: false, nearestBranch: null }; | |
export default (state = INITIAL_STATE, action) => { |
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 { | |
nearestBranchRequest, | |
nearestBranchSuccess, | |
nearestBranchFailure, | |
INITIAL_STATE | |
} from '../branchReducer'; | |
describe('branch reducer tests', () => { | |
it('given latitude and longitude when nearestBranchRequest then should set latitude, longitude and searching to true', () => { | |
const latitude = 1; |
OlderNewer