Add CDN to docs

This commit is contained in:
Tanner Linsley
2017-04-18 09:48:38 -06:00
parent c16df80938
commit 5ec616c2a3
4 changed files with 18 additions and 8 deletions
+14 -4
View File
@@ -68,8 +68,6 @@
## Installation
1. Install React Table as a dependency
```bash
$ npm install react-table
# or
$ yarn add react-table
```
2. Import the `react-table` module
@@ -79,13 +77,25 @@ import ReactTable from 'react-table'
// ES5
var ReactTable = require('react-table').default
```
3. Import styles by including `react-table.css` anywhere on the page
3. Import styles by including `react-table.css`
```javascript
// JS (Webpack)
import 'react-table/react-table.css'
// html
// Old-school
<link rel="stylesheet" href="node_modules/react-table/react-table.css">
```
##### CDN
```html
<!-- CSS -->
<link rel="stylesheet" href="https://unpkg.com/react-table@latest/react-table.css">
<!-- JS -->
<script src="https://unpkg.com/react-table@latest/react-table.js"></script>
<script>
var ReactTable = window.ReactTable.default
</script>
```
## Example
+1 -1
View File
@@ -16,7 +16,7 @@
<body>
<div id="root"></div>
<div id="error-display"></div>
<script src="static/preview.d69dfad9032e3535a779.bundle.js"></script>
<script src="static/preview.ddd20fad270a839bfa03.bundle.js"></script>
</body>
</html>
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
{"version":3,"file":"static/preview.d69dfad9032e3535a779.bundle.js","sources":["webpack:///static/preview.d69dfad9032e3535a779.bundle.js"],"mappings":"AAAA;AAkuDA;AA42DA;AA8rFA;AA0jFA;AAi6OA;AA24FA;AA+rDA;AAyjEA;AAmyDA;AAq3DA;AAquDA;AAssDA;AAwhDA;AA46DA;AAuoDA;AAo7CA;AAkpDA;AAklEA;AA04DA;AAwhCA;AAkvDA;AA2lDA;AAopEA;AAo4DA;AA8zDA;AAkyCA;AA61EA;AAi4GA;AAuoDA;AA00CA;AA+rCA;AAylCA;AA6rDA;AAyrBA;AAwBA;AA+jFA","sourceRoot":""}
{"version":3,"file":"static/preview.ddd20fad270a839bfa03.bundle.js","sources":["webpack:///static/preview.ddd20fad270a839bfa03.bundle.js"],"mappings":"AAAA;AAkuDA;AA42DA;AA8rFA;AA0jFA;AAi6OA;AA24FA;AA+rDA;AAyjEA;AAmyDA;AAq3DA;AAquDA;AAssDA;AAwhDA;AA46DA;AAuoDA;AAo7CA;AAkpDA;AAklEA;AA04DA;AAwhCA;AAkvDA;AA2lDA;AAopEA;AAo4DA;AA8zDA;AAkyCA;AA61EA;AAi4GA;AAuoDA;AA00CA;AA+rCA;AAylCA;AA6rDA;AAyrBA;AAwBA;AA+jFA","sourceRoot":""}