react-google-picker
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -111,4 +111,9 @@ 'use strict'; | ||
value: function createPicker(oauthToken) { | ||
var view = window.google.picker.ViewId[this.props.viewId]; | ||
var googleViewId = google.picker.ViewId[this.props.viewId]; | ||
var view = new window.google.picker.View(googleViewId); | ||
if (this.props.mimeTypes) { | ||
view.setMimeTypes(this.props.mimeTypes.join(',')); | ||
} | ||
if (!view) { | ||
@@ -115,0 +120,0 @@ throw new Error('Can\'t find view by viewId'); |
{ | ||
"name": "react-google-picker", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Simple react wrapper for google picker API", | ||
@@ -32,2 +32,3 @@ "main": "dist/react-google-picker.js", | ||
"devDependencies": { | ||
"babel-cli": "^6.24.0", | ||
"babel-core": "^6.0.20", | ||
@@ -34,0 +35,0 @@ "babel-eslint": "^4.1.3", |
@@ -5,3 +5,3 @@ React google picker | ||
Installation | ||
Installation | ||
============ | ||
@@ -22,13 +22,14 @@ ``` | ||
authImmediate={false} | ||
mimeTypes={['image/png', 'image/jpeg', 'image/jpg']} | ||
viewId={'DOCS'}> | ||
<MyCustomButton /> | ||
</GooglePicker> | ||
<MyCustomButton /> | ||
</GooglePicker> | ||
``` | ||
Demo | ||
Demo | ||
==== | ||
``` | ||
npm install | ||
npm start | ||
open http://localhost:8080 | ||
npm start | ||
open http://localhost:8080 | ||
``` | ||
@@ -35,0 +36,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37870
188
37
14
1766