Skip to content

Latest commit

 

History

History
63 lines (40 loc) · 1.46 KB

README.md

File metadata and controls

63 lines (40 loc) · 1.46 KB

react-valence-ui-fileviewer

Build status

React component for viewing different types of files (HTML, media, documents, etc.).

Installation

Install NPM dependencies:

npm install

Testing

This project uses the Jest unit testing framework. To run the unit tests:

npm run test:unit

Code is also linted using eslint:

npm run lint

Both unit tests and linting is performed during CI builds as part of the test script:

npm test

Sample

Included is a sample application which allows you to launch the file viewer with many different file types. To build the sample application, run:

npm run build-sample

To serve the sample application, run:

npm run serve

Then open http://localhost:8080/ in your browser.

Parameters

FlieViewer has the following parameters:

progressCallback Takes a callback function, which should accept a decimal, indicating the percentage loaded out of 100. May or may not be accurate.

Contributing

Contributions are welcome, please submit a pull request!

Code Style

This repository is configured with EditorConfig and eslint rules and contributions should make use of them.