Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-image-upload

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-image-upload - npm Package Compare versions

Comparing version 2.0.1 to 3.0.0

dist/components/icons.d.ts

71

package.json
{
"name": "react-image-upload",
"version": "2.0.1",
"version": "3.0.0",
"description": "react library for uploading images",

@@ -8,8 +8,5 @@ "author": "chimdie",

"repository": "chimdie/react-image-upload",
"main": "dist/index.js",
"module": "dist/index.es.js",
"source": "src/index.js",
"engines": {
"node": ">=10"
},
"source": "src/index.tsx",
"private": false,
"type": "module",
"keywords": [

@@ -21,54 +18,28 @@ "react",

"scripts": {
"build": "rollup -c",
"start": "rollup -c -w",
"build": "tsc && vite build",
"dev": "vite",
"test": "echo \"No test specified\"",
"test:lint": "eslint .",
"test:unit": "cross-env CI=1 react-scripts test --env=jsdom",
"test:watch": "react-scripts test --env=jsdom",
"lint": "npm run format && npm run lint:fix",
"lint:fix": "eslint ./src --ext .jsx,.js,.ts,.tsx --quiet --fix --ignore-path ./.gitignore",
"format": "prettier --loglevel warn --write \"./**/*.{js,jsx,ts,tsx,css,md,json}\" ",
"predeploy": "cd example && npm install && npm run build",
"deploy": "gh-pages -d example/build"
"deploy": "gh-pages -d example/build",
"prepack": "json -f package.json -I -e \"delete this.devDependencies; delete this.dependencies\""
},
"peerDependencies": {
"react": "^16.0.0"
"react": "^18.2.0"
},
"devDependencies": {
"@babel/preset-env": "^7.16.0",
"@babel/preset-react": "^7.16.0",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-commonjs": "^21.0.1",
"@rollup/plugin-node-resolve": "^13.0.6",
"babel-eslint": "^10.0.3",
"babel-plugin-styled-components": "^1.13.3",
"core-js": "^3.19.1",
"cross-env": "^7.0.2",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.7.0",
"eslint-config-standard": "^14.1.0",
"eslint-config-standard-react": "^9.2.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-react": "^7.17.0",
"eslint-plugin-standard": "^4.0.1",
"gh-pages": "^2.2.0",
"microbundle-crl": "^0.13.10",
"npm-run-all": "^4.1.5",
"postcss": "^8.3.11",
"prettier": "^2.0.4",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-scripts": "^3.4.1",
"rollup": "^2.59.0",
"rollup-plugin-peer-deps-external": "^2.2.4",
"rollup-plugin-postcss": "^4.0.1",
"rollup-plugin-styles": "^3.14.1",
"rollup-plugin-terser": "^7.0.2"
},
"files": [
"dist"
],
"dependencies": {
"@rollup/plugin-image": "^2.1.1"
"main": "./dist/index.umd.js",
"module": "./dist/index.es.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.es.js",
"require": "./dist/index.umd.js"
},
"./dist/style.css": "./dist/style.css"
}
}

@@ -23,5 +23,7 @@ # react-image-upload

}
function runAfterImageDelete(file) {
console.log({ file })
}
return (

@@ -43,19 +45,4 @@ <ImageUploader

style={{ height: 200, width: 200, background: 'rgb(0 182 255)' }}
deleteIcon={
<img
src='https://img.icons8.com/ios-glyphs/30/000000/delete-sign.png'
alt=''
/>
}
uploadIcon={
<svg
className='svg-circleplus'
viewBox='0 0 100 100'
style={{ height: '40px', stroke: '#000' }}
>
<circle cx='50' cy='50' r='45' fill='none' strokeWidth='7.5'></circle>
<line x1='32.5' y1='50' x2='67.5' y2='50' strokeWidth='5'></line>
<line x1='50' y1='32.5' x2='50' y2='67.5' strokeWidth='5'></line>
</svg>
}
deleteIcon={<RiDeleteRow />}
uploadIcon={<BsCamera />}
/>

@@ -66,9 +53,9 @@ ```

| Property | Type | Default | Description |
| :------------ | :--: | -------- | --------------------------------------------------------------- |
| style | obj | optional | style the file with css |
| deleteIcon | func | optional | adds your delete icon or html element |
| uploadIcon | func | optional | adds your upload icon or html element |
| onFileAdded | func | optional | runs after file has been selected and returns the selected file |
| onFileRemoved | func | optional | runs after file has been removed and returns the removed file |
| Property | Type | Default | Description |
| :------------ | :--: | -------- | ------------------------------------------------------------------------------- |
| style | obj | optional | Write your custom css |
| deleteIcon | ele | optional | The icon used to delete file |
| uploadIcon | ele | optional | The icon used to upload file |
| onFileAdded | func | optional | A function that runs after file has been uploaded and returns the uploaded file |
| onFileRemoved | func | optional | A function that runs after file has been removed and returns the removed file |

@@ -75,0 +62,0 @@ ## License

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc