Skip to content

Instantly share code, notes, and snippets.

View ridgeO's full-sized avatar

Ridge ridgeO

View GitHub Profile
@ridgeO
ridgeO / BSInputGroupsReact.js
Last active May 30, 2018 19:49
Bootstrap style input groups
import React from "react";
import { render } from "react-dom";
import styled from "styled-components";
const InputGroup = styled.div`
position: relative;
display: flex;
align-items: stretch;
flex-wrap: no-wrap;
`;
@ridgeO
ridgeO / 01.js
Last active May 15, 2021 08:38
Code snippets from RNCardStack application as featured in http://platypus.is/posts/7
# index.ios.js and index.android.js
import './components/App.js';
# components/App.js
'use strict';
import React, { Component } from 'react';
import {
AppRegistry,
@ridgeO
ridgeO / 01.js
Created June 27, 2017 20:19
Code snippets from RNFirebaseChat application as featured in http://platypus.is/posts/6
# index.ios.js and index.android.js
import './app.js';
@ridgeO
ridgeO / importFirebase.js
Created June 9, 2017 01:08
Code snippets from ReactNativeFirebase application as featured in http://platypus.is/posts/5
# firebaseConfig.js
...
import * as firebase from 'firebase';
...
# firebaseConfig.js
...
// Initialize Firebase
const firebaseConfig = {
apiKey: "<your-api-key>",
authDomain: "<your-auth-domain>",
databaseURL: "<your-database-url>",
storageBucket: "<your-storage-bucket>"
};
# index.ios.js and/or index.android.js
...
import firebaseApp from './firebaseConfig.js';
...
# firebaseConfig.js
...
import * as firebase from 'firebase';
...
@ridgeO
ridgeO / addNestedNavToApp.js
Created May 30, 2017 05:26
Code snippet from ReactNav application as featured in http://platypus.is/posts/4
# App.js
...
class ReactNav extends Component {
render() {
return (
<NestedNav/>
);
}
}
@ridgeO
ridgeO / modifyGreenAndRed.js
Last active May 30, 2017 05:25
Code snippet from ReactNav application as featured in http://platypus.is/posts/4
# App.js
...
class GreenScreen extends Component {
render() {
return(
<View style={styles.green}>
...
<TouchableHighlight
style={styles.button}
@ridgeO
ridgeO / createNestedNavDrawer.js
Created May 30, 2017 05:10
Code snippet from ReactNav application as featured in http://platypus.is/posts/4
# App.js
...
const NestedNav = StackNavigator(
{
Landing: { screen: GreenScreen },
Drawer: { screen: DrawerNavigator(
{
Home: { screen: TabNavigator(
{