This repository was archived by the owner on May 8, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 22< html >
33< head >
44 < meta charset ="utf-8 " />
5- < title > Draft Typeahead • Mentions </ title >
5+ < title > Draft Typeahead • Overlay </ title >
66</ head >
77< body >
88 < div id ="target "> </ div >
1818 const { Editor, EditorState } = Draft ;
1919 const { TypeaheadEditor } = DraftTypeahead ;
2020
21- const MentionsTypeahead = ( { left, top, text } ) => {
21+ const Overlay = ( { left, top, text } ) => {
2222 const style = Object . assign ( { } , styles . typeahead , {
2323 position : 'absolute' ,
2424 left,
3131 ) ;
3232 } ;
3333
34- class MentionsEditorExample extends React . Component {
34+ class OverlayEditorExample extends React . Component {
3535 constructor ( ) {
3636 super ( ) ;
3737 this . state = {
5353 if ( ! typeaheadState ) {
5454 return null ;
5555 }
56- return < MentionsTypeahead { ...typeaheadState } /> ;
57- }
56+ return < Overlay { ...typeaheadState } /> ;
57+ } ;
5858
5959 render = ( ) => (
6060 < div style = { styles . root } >
9090 } ;
9191
9292 ReactDOM . render (
93- < MentionsEditorExample /> ,
93+ < OverlayEditorExample /> ,
9494 document . getElementById ( 'target' )
9595 ) ;
9696 </ script >
You can’t perform that action at this time.
0 commit comments