Skip to content

Commit

Permalink
upgraded CustUp version
Browse files Browse the repository at this point in the history
  • Loading branch information
paulosabayomi committed Feb 11, 2024
1 parent d9e6224 commit 405f2a8
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Publish to mpm
name: Publish to npm

on:
release:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ import { TCustUp } from "@custup/react";
const ExampleComponent = React.memo((props: any) => {
const ref1 = React.useRef<TCustUp | undefined>()

const exampleCustUpSubmit = React.memo(() => {
const exampleCustUpSubmit = React.useCallback(() => {
ref1.current?.upload();
}, [ref1.current])

Expand Down Expand Up @@ -110,7 +110,7 @@ const ExampleComponent = React.memo((props: any) => {
const ref2 = React.useRef<TCustUp | undefined>()
const ref3 = React.useRef<TCustUp | undefined>()

const exampleCustUpSubmit = React.memo(() => {
const exampleCustUpSubmit = React.useCallback(() => {
ref1.current?.upload();
}, [ref1.current])

Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

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

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions package-lock.json

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

17 changes: 12 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@custup/react",
"version": "0.0.1",
"version": "0.1.0",
"description": "Highly customisable React JS file upload library with zero dependencies",
"private": false,
"main": "dist/index.js",
Expand All @@ -9,6 +9,14 @@
"url": "https://pryxy.com/about-me"
},
"license": "MIT",
"keywords": [
"custup",
"react-js-file-uploader",
"custup-react",
"file-uploader",
"customisable-file-uploader",
"customisable"
],
"types": "./dist/index.ts",
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
Expand All @@ -24,7 +32,7 @@
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
"babel-cli": "^6.26.0",
"custup": "^0.2.0",
"custup": "^1.0.5",
"jest-environment-jsdom": "^29.7.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand All @@ -36,10 +44,9 @@
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --transformIgnorePatterns 'node_modules/(?!my-library-dir)/'",
"eject": "react-scripts eject",
"rollup": "rollup --config rollup.config.ts --configPlugin typescript"
"rollup": "rollup --config rollup.config.ts --configPlugin typescript",
"package": "npm run rollup; npm run test"
},
"eslintConfig": {
"extends": [
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/CustUp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ const CustUp = React.memo(React.forwardRef((options: ICustUpOptions, ref) => {
const _initialize_custup = React.useCallback(() => {
if (_instance_Ref.current == null) {
const _c_inst = new MCustUp({
targetRootElement: "#" + options.id,
...options
...options,
targetRootElement: "#" + options.id
});
_instance_Ref.current = _c_inst;
}
Expand Down

0 comments on commit 405f2a8

Please sign in to comment.