Skip to content

Commit

Permalink
readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyBernier committed Dec 15, 2023
1 parent 574fb0d commit 9ad11e8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 24 deletions.
4 changes: 4 additions & 0 deletions example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ This sample application demonstrates how to use Canvas embeds in your applicatio
npm i
npm run dev
```

## Local development with React repo

The `canvas-embed` repo is hosted in the `react` folder. You can link to the local version via: `npm link ../react` for local development
28 changes: 4 additions & 24 deletions react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,10 @@ npm install canvas-embed
## Usage

```
import { Chart } from "canvas-embed";
import { Canvas } from "canvas-embed";
<Chart
chartId={embedId} // From a chart you built in Canvas
authToken={token} // Generated from your backend application using one of our clients
disableExport={true} // Set if you want a dropdown allowing the chart to be downloaded
timezone={null} // Set if you want date times to be adjusted to a timezone
<Canvas
canvasId={canvasId}
authToken={AUTH_TOKEN}
/>
```

## Internal

### Development

Copy over Rust types from main repo with (adjust relative path in script as necessary):

```
npm run copy-rust-types
```

### Publishing

```
npm version patch
npm run build
npm run publish --access public
```

0 comments on commit 9ad11e8

Please sign in to comment.