How to use the react-mosaic-component.Mosaic.ofType function in react-mosaic-component

To help you get started, we’ve selected a few react-mosaic-component examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github palantir / tslint-playground / src / components / App.tsx View on Github external
import { DEFAULT_CODE, DEFAULT_CONFIG } from "../config";
import { BrowserLinter } from "../linter";
import { decodeUrl, encodeUrl, failureToMarker } from "../utils";
import { CodeEditor } from "./CodeEditor";

type WindowType = "code" | "config" | "output";

export interface IAppState {
  config: string;
  code: string;
  lintResult: LintResult | undefined;
  windowLayout: MosaicNode;
  configError: boolean;
}

const TslintMosaic = Mosaic.ofType();
const TslintMosaicWindow = MosaicWindow.ofType();

const capitalizeFirstLetter = (str: string) => {
  return str.charAt(0).toUpperCase() + str.slice(1);
};

class App extends React.Component<{}, IAppState> {
  public linter: BrowserLinter;
  public state: IAppState = {
    code: DEFAULT_CODE,
    config: DEFAULT_CONFIG,
    configError: false,
    lintResult: undefined,
    windowLayout: {
      direction: "column",
      first: {