Skip to content

Commit

Permalink
Docs: Adding section of using Preview as a component (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
priyajeet committed Jul 20, 2017
1 parent aa93d09 commit 3c3eb06
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ Box Content Preview supports 100+ file types, including most document and image

Usage
-----
The Box Content Preview UI Element can be used either by including the JavaScript/CSS scripts linked above or by pulling from our [NPM package](https://www.npmjs.com/package/box-ui-elements).

### Including preview as a library
You can self-host the Box Content Preview UI Element or reference the versions available on Box's CDN.

```html
Expand Down Expand Up @@ -65,6 +68,9 @@ You can self-host the Box Content Preview UI Element or reference the versions a
</html>
```

### Importing preview as a React Component
Please reference https://github.com/box/box-content-preview-demo for a minimal React application using the Preview UI Element.

CORS (Cross-Origin Resource Sharing)
------------------------------------
For security purposes, you must whitelist your application's HTTP origin, omitting any trailing slash, in the configuration section of the Developer Console. For example, CodePen's domain is whitelisted for the demo application below.
Expand Down

0 comments on commit 3c3eb06

Please sign in to comment.