-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreact-at.jsx
More file actions
35 lines (30 loc) · 928 Bytes
/
react-at.jsx
File metadata and controls
35 lines (30 loc) · 928 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//// hack for current version of react-at
await loadJs('https://unpkg.com/[email protected]/prop-types.min.js')
React.PropTypes = PropTypes
// await loadJs('https://unpkg.com/react-at')
await loadJsForceUmd({
url: 'https://unpkg.com/[email protected]/dist/index.js',
name: 'ReactAt',
deps: { react: 'React' },
})
////
let { default: At } = ReactAt
appendCss(`
.editor { margin-top:20px; padding:4px 8px; height:120px; border:solid 1px gray; white-space:pre-wrap }
`)
let members = ['fritx', 'linguokang', 'huangruichang']
let App = () => {
return (
<div style={{ padding: 20 }}>
<h1>react-at</h1>
<a target="_blank" href="https://github.com/fritx/react-at">
https://github.com/fritx/react-at
</a>
<At members={members}>
<div style={{ height: 100 }}>
<div class="editor" contentEditable>@fritx @huangruichang </div>
</div>
</At>
</div>
)
}