Skip to content
This repository was archived by the owner on Apr 8, 2019. It is now read-only.

Commit e82a845

Browse files
authored
Update README.md
1 parent ce0296f commit e82a845

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,40 @@ ReactCLI is a react renderer for the command line. All of the benefits of React,
44

55
![react-cli-demo](/.github/demo.svg)
66

7+
```javascript
8+
const ReactCLI = require("./index");
9+
const React = require("react");
10+
const chalk = require("chalk");
11+
12+
class MyReactCLIApp extends React.Component {
13+
state = {
14+
step: 0
15+
};
16+
17+
render() {
18+
return (
19+
<div border={{ horizontal: "*", vertical: "*" }} align="center">
20+
My {chalk.blue("New")} {chalk.magenta("ReactCLI App")} 🚀
21+
<div horizontal>
22+
<div align="center">
23+
{this.state.step >= 1 ? chalk.green("✔︎") : ""} Step 1
24+
<br />
25+
{this.state.step >= 2 ? chalk.green("✔︎") : ""} Step 2
26+
<br />
27+
{this.state.step >= 3 ? chalk.green("✔︎") : ""} Step 3
28+
</div>
29+
<div border={{ horizontal: "-", vertical: "|" }} align="center">
30+
Number of steps done:{" "}
31+
{chalk.bold.magenta(this.state.step.toString())}
32+
</div>
33+
</div>
34+
</div>
35+
);
36+
}
37+
}
38+
39+
```
40+
741
## Getting started
842

943
### yarn

0 commit comments

Comments
 (0)