Skip to content
This repository has been archived by the owner on Mar 6, 2023. It is now read-only.

Commit

Permalink
adding prop-types module
Browse files Browse the repository at this point in the history
  • Loading branch information
hleote committed Dec 19, 2017
1 parent 6e4a814 commit f95d0cc
Show file tree
Hide file tree
Showing 4 changed files with 3,405 additions and 10 deletions.
15 changes: 8 additions & 7 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import "./styles.css";
import React from "react";
import ReactDom from "react-dom";
import PropTypes from "prop-types";
import {
Modal,
Button
Expand Down Expand Up @@ -272,7 +273,7 @@ class Cropper extends React.Component {
}
}
Cropper.propTypes = {
image: React.PropTypes.string.isRequired,
image: PropTypes.string.isRequired,
width: numberableType,
height: numberableType,
zoom: numberableType
Expand Down Expand Up @@ -319,14 +320,14 @@ class AvatarCropper extends React.Component {

// The AvatarCropper Prop API
AvatarCropper.propTypes = {
image: React.PropTypes.string.isRequired,
onCrop: React.PropTypes.func.isRequired,
closeButtonCopy: React.PropTypes.string,
cropButtonCopy: React.PropTypes.string,
image: PropTypes.string.isRequired,
onCrop: PropTypes.func.isRequired,
closeButtonCopy: PropTypes.string,
cropButtonCopy: PropTypes.string,
width: numberableType,
height: numberableType,
modalSize: React.PropTypes.oneOf(["lg", "large", "sm", "small"]),
onRequestHide: React.PropTypes.func.isRequired
modalSize: PropTypes.oneOf(["lg", "large", "sm", "small"]),
onRequestHide: PropTypes.func.isRequired
};
AvatarCropper.defaultProps = { width: 400, height: 400, modalSize: "large",
closeButtonCopy: "Close", cropButtonCopy: "Crop and Save"};
Expand Down
119 changes: 119 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-avatar-cropper",
"version": "0.1.3",
"name": "@dixa/react-avatar-cropper",
"version": "0.1.4-beta",
"repository": "https://github.com/DropsOfSerenity/react-avatar-cropper",
"description": "An avatar cropper meant to be a complete solution to avatar cropping.",
"main": "dist/ReactAvatarCropper.min.js",
Expand All @@ -21,7 +21,8 @@
"react"
],
"dependencies": {
"react-bootstrap": "^0.30.2",
"prop-types": "^15.6.0",
"react-bootstrap": "^0.31.3",
"warning": "^2.1.0"
},
"peerDependencies": {
Expand Down
Loading

0 comments on commit f95d0cc

Please sign in to comment.