Skip to content

Commit

Permalink
release 0.1.8, still much to work
Browse files Browse the repository at this point in the history
  • Loading branch information
Omar Flores Grimontt committed Sep 10, 2019
2 parents 73f866e + da99fb0 commit 89721e5
Show file tree
Hide file tree
Showing 21 changed files with 10,848 additions and 46 deletions.
10 changes: 10 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"presets": [
"@babel/preset-env",
"@babel/preset-react"
],
"plugins": [
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-transform-react-jsx"
]
}
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules/**/*
node_modules/**/*
lib/
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@ typings/
# next.js build output
.next

# package-lock.json
# Lib

package-lock.json
lib/
66 changes: 66 additions & 0 deletions example/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import React from 'react'
import Viewer from '../lib'

import jpg from './samples/sample.jpeg'
import jpg360 from './samples/sample360.jpg'
import docx from './samples/sample.docx'
import pdf from './samples/sample.pdf'
import csv from './samples/sample.csv'
import xlsx from './samples/sample.xlsx'
import mp3 from './samples/sample.mp3'
import mp4 from './samples/sample.mp4'
import png from './samples/sample.png'

export const App = () => {
return (
<div>
<h1>PNG</h1>
<Viewer
type='png'
path={png}
/>
<h1>JPG</h1>
<Viewer
type='jpg'
path={jpg}
/>
<h1>JPG 360</h1>
<Viewer
type='jpg'
path={jpg360}
width={500}
height={500}
/>
<h1>DOCX</h1>
<Viewer
type='docx'
path={docx}
/>
<h1>PDF</h1>
<Viewer
type='pdf'
path={pdf}
/>
<h1>CSV</h1>
<Viewer
type='csv'
path={csv}
/>
<h1>XLSX</h1>
<Viewer
type='xlsx'
path={xlsx}
/>
<h1>MP3</h1>
<Viewer
type='mp3'
path={mp3}
/>
<h1>MP4</h1>
<Viewer
type='mp4'
path={mp4}
/>
</div>
)
}
13 changes: 13 additions & 0 deletions example/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<title>React File Preview</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>
</html>
6 changes: 6 additions & 0 deletions example/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import '@babel/polyfill'
import React from 'react'
import ReactDOM from 'react-dom'
import { App } from './App'

ReactDOM.render(<App/>, document.getElementById('root'))
11 changes: 11 additions & 0 deletions example/samples/sample.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Year,Crime Index Ranking ,City,Rate
2009,1,New York,2242.1
2009,2,San Jose,2745.7
2009,3,San Diego,2903.7
2009,4,Los Angeles,3074
2009,5,Las Vegas,4407.7
2009,6,Phoenix,4654.3
2009,7,Philadelphia,4849.5
2009,8,Dallas,4407.7
2009,9,Houston,6444.2
2009,10,San Antonio,7241.6
Binary file added example/samples/sample.docx
Binary file not shown.
Binary file added example/samples/sample.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/samples/sample.mp3
Binary file not shown.
Binary file added example/samples/sample.mp4
Binary file not shown.
Binary file added example/samples/sample.pdf
Binary file not shown.
Binary file added example/samples/sample.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/samples/sample.xlsx
Binary file not shown.
Binary file added example/samples/sample360.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 89721e5

Please sign in to comment.