Skip to content

Instantly share code, notes, and snippets.

View erictraut's full-sized avatar

Eric Traut erictraut

  • Washington State
View GitHub Profile
@erictraut
erictraut / ToastService.tsx
Created September 4, 2017 17:37
React service that manages a queue of toasts to be displayed
/**
* ToastService.ts
*
* Service to show in in-app status.
*/
import _ = require('lodash');
import RX = require('reactxp');
export interface ToastMessageParams {
@erictraut
erictraut / ToastView.tsx
Last active September 4, 2017 17:36
ReactXP component that implements a toast notification view that slides in from the top of the screen
/**
* ToastView.tsx
*
* A component that dsplays system toast measages.
*/
import RX = require('reactxp');
import ToastService, { ToastMessage, ToastMessageParams } from '../services/ToastService';
@erictraut
erictraut / DrawerControl.tsx
Created June 19, 2017 00:35
ReactXPDrawerWithConstantWidth
/*
* This file implements a basic drawer control.
*/
import RX = require('reactxp');
interface MainPanelProps extends RX.CommonStyledProps<RX.Types.ViewStyleRuleSet> {
renderDrawer: () => JSX.Element;
renderContent: () => JSX.Element;
}
@erictraut
erictraut / App.tsx
Created June 18, 2017 18:22
ReactXPDrawer
/*
* This file demonstrates a basic ReactXP app.
*/
import RX = require('reactxp');
import ContentPanel from './ContentPanel';
import DrawerControl = require('./DrawerControl');
import DrawerPanel from './DrawerPanel';