Skip to content

Commit fa34d98

Browse files
committed
2 parents d5c4fd3 + 77474d3 commit fa34d98

File tree

4 files changed

+1996
-1546
lines changed

4 files changed

+1996
-1546
lines changed

dst/README.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# react-retool
2+
3+
A React wrapper for embedding Retool apps.
4+
5+
## Install
6+
7+
```
8+
// with npm
9+
$ npm install react-retool --save
10+
11+
// with yarn
12+
$ yarn add react-retool
13+
```
14+
15+
16+
## Usage
17+
18+
```
19+
import Retool from 'react-retool';
20+
21+
function App() {
22+
return (
23+
<Retool url="https://retoolin.tryretool.com/embedded/public/f7607e1f-670a-4ebf-9a09-be54cf17181e"/>
24+
);
25+
}
26+
27+
export default App;
28+
```
29+
30+
### Options
31+
`<Retool>` expects a `url` prop pointing to an embedded Retool application. You can generate this URL in the editor mode of a Retool app by clicking "Share" then "Public".
32+
33+
34+
### Example
35+
36+
Running `yarn start` will start an application with a basic Retool app embeded.
37+
38+
There is a live example here: [https://react-retool.surge.sh](https://react-retool.surge.sh)
39+
40+
## Development
41+
42+
In the project directory, you can run:
43+
44+
### `yarn start`
45+
46+
Runs the app in the development mode.\
47+
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
48+
49+
The page will reload if you make edits.\
50+
You will also see any lint errors in the console.
51+
52+
### `yarn test`
53+
54+
Launches the test runner in the interactive watch mode.\
55+
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
56+
57+
### `yarn publish:npm`
58+
59+
Builds the project in the `/dist` directory. Publish to npm with `npm publish`.

dst/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-retool",
3-
"version": "0.2.1",
3+
"version": "0.2.2",
44
"private": false,
55
"repository": {
66
"type": "git",
@@ -38,7 +38,7 @@
3838
"build": "react-scripts build",
3939
"test": "react-scripts test",
4040
"eject": "react-scripts eject",
41-
"publish:npm": "rm -rf dst && mkdir dst && babel src/components -d dst --copy-files && mv ./dst/Retool.js ./dst/index.js && cp ./package.json ./dst/package.json"
41+
"publish:npm": "rm -rf dst && mkdir dst && babel src/components -d dst --copy-files && mv ./dst/Retool.js ./dst/index.js && cp ./package.json ./dst/package.json && cp ./README.md ./dst/README.md"
4242
},
4343
"eslintConfig": {
4444
"extends": [

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)