Skip to content

Instantly share code, notes, and snippets.

View AlexFrazer's full-sized avatar
🦊
🦊🦊🦊

Frazer AlexFrazer

🦊
🦊🦊🦊
View GitHub Profile
@AlexFrazer
AlexFrazer / Box.tsx
Last active February 9, 2020 20:31
A basic button component
import styled from "@emotion/styled";
import { shouldForwardProp } from "@styled-system/should-forward-prop";
import {
background,
border,
color,
flexbox,
grid,
layout,
position,
import axios, { AxiosInstance } from 'axios';
import moment from 'moment';
import * as readline from 'readline';
const FIELDS = ['applicant', 'location', 'DayOrder', 'start24', 'end24'];
const serializeFields = (fields: string[]) =>
fields.map(field => `\`${field}\``).join(',');
const range = (start: number, end: number) =>
/* eslint-disable */
declare module 'react-window' {
import { Requireable, Validator } from 'prop-types';
export type Direction = 'vertical' | 'horizontal';
export type Alignment = 'auto' | 'center' | 'end' | 'start';
export type RenderProps<TDataType extends any = any> = {
key?: string;
data?: TDataType;
import * as React from 'react';
import { InfiniteLoader, AutoSizer, GridProps, Dimensions, IndexRange, Index } from 'react-virtualized';
import ProductLoader from './ProductLoader';
import ProductFilters from './ProductFilters';
export interface Props extends GridProps {
limit: number;
cardWidth: number;
cardHeight: number;
padding: number;
import * as React from 'react';
import * as rbush from 'rbush';
import * as PropTypes from 'prop-types';
export interface Props {
/* +/- how many pixels from mousedown */
tolerance: number;
/* What to do on selection */
onSelection(o: { selection: Set<string>, e: React.MouseEvent<HTMLDivElement> }): void;
/* What to do when selection has been completed */
import cssnano from 'cssnano';
import simplevars from 'postcss-simple-vars';
import nested from 'postcss-nested';
import cssnext from 'postcss-cssnext';
import postcssModules from 'postcss-modules';
import tslint from 'rollup-plugin-tslint';
import uglify from 'rollup-plugin-uglify';
import postcss from 'rollup-plugin-postcss';
import replace from 'rollup-plugin-replace';
import commonjs from 'rollup-plugin-commonjs';
import * as React from 'react';
import { findDOMNode } from 'react-dom';
type Props = {
selectableKey: any,
children?: React.ReactNode,
};
/**
* Wraps an element inside of a SelectableGroup and makes it possible to select
import * as React from 'react';
import 'lib/jwplayer-7.7.4/jwplayer.js';
interface Props extends SetupConfig, Events {};
interface EventMap {
[name: string]: (e: any) => void,
}
export default class ShiftPlayer extends React.Component<Props, {}> {
import React, { Component } from 'react';
import { observer } from 'mobx-react';
import DevTools from 'mobx-react-devtools';
@observer
export default class App extends Component {
state = {
value: '',
};
import React, { Component } from 'react';
import ImageError from 'app/components/image/ImageError';
type Props = {
src: string,
};
type State = {
hasError: boolean,
};