signal-desktop/js/react/util/BackboneWrapper.md
Scott Nonnenberg 1326b26585
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.
2018-04-04 16:08:38 -07:00

20 lines
412 B
Markdown

Rendering a real `Whisper.MessageView` using `<util.MessageParents />` and
`<util.BackboneWrapper />`.
```jsx
const model = new Whisper.Message({
type: 'outgoing',
body: 'text',
sent_at: Date.now() - 5000,
})
const View = Whisper.MessageView;
const options = {
model,
};
<util.MessageParents theme="android">
<util.BackboneWrapper
View={View}
options={options}
/>
</util.MessageParents>
```