Skip to content

Commit 5ec616c

Browse files
committed
Add CDN to docs
1 parent c16df80 commit 5ec616c

File tree

4 files changed

+18
-8
lines changed

4 files changed

+18
-8
lines changed

README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@
6868
## Installation
6969
1. Install React Table as a dependency
7070
```bash
71-
$ npm install react-table
72-
# or
7371
$ yarn add react-table
7472
```
7573
2. Import the `react-table` module
@@ -79,13 +77,25 @@ import ReactTable from 'react-table'
7977
// ES5
8078
var ReactTable = require('react-table').default
8179
```
82-
3. Import styles by including `react-table.css` anywhere on the page
80+
3. Import styles by including `react-table.css`
8381
```javascript
8482
// JS (Webpack)
8583
import 'react-table/react-table.css'
86-
// html
84+
// Old-school
8785
<link rel="stylesheet" href="node_modules/react-table/react-table.css">
8886
```
87+
##### CDN
88+
```html
89+
<!-- CSS -->
90+
<link rel="stylesheet" href="https://unpkg.com/react-table@latest/react-table.css">
91+
92+
<!-- JS -->
93+
<script src="https://unpkg.com/react-table@latest/react-table.js"></script>
94+
95+
<script>
96+
var ReactTable = window.ReactTable.default
97+
</script>
98+
```
8999

90100

91101
## Example

docs/iframe.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<body>
1717
<div id="root"></div>
1818
<div id="error-display"></div>
19-
<script src="static/preview.d69dfad9032e3535a779.bundle.js"></script>
19+
<script src="static/preview.ddd20fad270a839bfa03.bundle.js"></script>
2020
</body>
2121
</html>
2222

docs/static/preview.d69dfad9032e3535a779.bundle.js renamed to docs/static/preview.ddd20fad270a839bfa03.bundle.js

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

docs/static/preview.d69dfad9032e3535a779.bundle.js.map renamed to docs/static/preview.ddd20fad270a839bfa03.bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)