Full styleguide now available via yarn styleguide
Due to a number of hacks, the style guide can be used to show Backbone views. This will allow a smooth path from the old way of doing things to the new.
This commit is contained in:
parent
893fb1cb9e
commit
1326b26585
21 changed files with 4006 additions and 363 deletions
24
js/react/util/index.ts
Normal file
24
js/react/util/index.ts
Normal file
|
@ -0,0 +1,24 @@
|
|||
// Helper components used in the styleguide, exposed at 'util' in the global scope via the
|
||||
// context option in reaat-styleguidist.
|
||||
|
||||
export { MessageParents } from './MessageParents';
|
||||
export { BackboneWrapper } from './BackboneWrapper';
|
||||
|
||||
// Here we can make things inside Webpack available to Backbone views like preload.js.
|
||||
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
|
||||
import { Message } from '../conversation/Message';
|
||||
import { Reply } from '../conversation/Reply';
|
||||
|
||||
// Required, or TypeScript complains about adding keys to window
|
||||
const parent = window as any;
|
||||
|
||||
parent.React = React;
|
||||
parent.ReactDOM = ReactDOM;
|
||||
|
||||
const SignalReact = parent.Signal.React = parent.Signal.React || {};
|
||||
|
||||
SignalReact.Message = Message;
|
||||
SignalReact.Reply = Reply;
|
Loading…
Add table
Add a link
Reference in a new issue