-
-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #80 from d4rky-pl/79_allow_other_blessed_libraries
Add createBlessedRenderer function
- Loading branch information
Showing
7 changed files
with
224 additions
and
167 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
*.log | ||
node_modules | ||
dist | ||
.idea |
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,29 @@ | ||
import React, {Component} from 'react'; | ||
import blessed from 'neo-blessed'; | ||
import {createBlessedRenderer} from '../src'; | ||
|
||
const render = createBlessedRenderer(blessed); | ||
|
||
class App extends Component { | ||
render() { | ||
return ( | ||
<box label="react-blessed demo" | ||
border={{type: 'line'}} | ||
style={{border: {fg: 'cyan'}}}> | ||
This example uses neo-blessed fork of blessed library. | ||
</box> | ||
); | ||
} | ||
} | ||
|
||
const screen = blessed.screen({ | ||
autoPadding: true, | ||
smartCSR: true, | ||
title: 'react-blessed demo app' | ||
}); | ||
|
||
screen.key(['escape', 'q', 'C-c'], function(ch, key) { | ||
return process.exit(0); | ||
}); | ||
|
||
const component = render(<App />, screen); |
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 |
---|---|---|
|
@@ -7,6 +7,7 @@ const examples = [ | |
'demo', | ||
'form', | ||
'framer', | ||
'neo-blessed', | ||
'progressbar', | ||
'remove', | ||
]; | ||
|
Oops, something went wrong.