forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add plain text renderer (elastic#564)
- Loading branch information
1 parent
4b94d2e
commit 7111c07
Showing
5 changed files
with
24 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import ReactDOM from 'react-dom'; | ||
import React from 'react'; | ||
|
||
export const text = () => ({ | ||
name: 'text', | ||
displayName: 'Plain Text', | ||
help: 'Render output as plain text', | ||
reuseDomNode: true, | ||
render(domNode, config, handlers) { | ||
ReactDOM.render(<div>{config}</div>, domNode, () => handlers.done()); | ||
handlers.onDestroy(() => ReactDOM.unmountComponentAtNode(domNode)); | ||
}, | ||
}); |