From fc0d201ec756eda0a734a34b678d30db8766a823 Mon Sep 17 00:00:00 2001 From: Jason Kurian Date: Mon, 13 Jan 2020 15:11:27 -0500 Subject: [PATCH 1/2] apply other props to outer div onClick was not passed on, but this way any other custom props can be passed on to the containing div --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 5646f5e..34c9eb7 100644 --- a/index.js +++ b/index.js @@ -34,8 +34,8 @@ class UserAvatar extends React.Component { colors=defaultColors, size, style, - onClick, - className + className, + ...props } = this.props; if (!name) throw new Error('UserAvatar requires a name'); @@ -82,7 +82,7 @@ class UserAvatar extends React.Component { } return ( -
+
{inner}
From 653ed35545e34608a384700dbe0e7f206de1373b Mon Sep 17 00:00:00 2001 From: Jason Kurian Date: Mon, 13 Jan 2020 15:18:07 -0500 Subject: [PATCH 2/2] attempt to upgrade dependencies as required --- .babelrc | 5 ++++- package.json | 11 ++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.babelrc b/.babelrc index 0578679..85196b5 100644 --- a/.babelrc +++ b/.babelrc @@ -1,3 +1,6 @@ { - "presets": ["react", "es2015"] + "presets": [ + "@babel/preset-react", + "@babel/preset-env" + ] } diff --git a/package.json b/package.json index 10fa770..422b394 100644 --- a/package.json +++ b/package.json @@ -18,11 +18,12 @@ "license": "MIT", "repository": "github:wbinnssmith/react-user-avatar", "devDependencies": { - "babel-cli": "^6.3.13", - "babel-preset-es2015": "^6.3.13", - "babel-preset-react": "^6.3.13", - "babelify": "^7.2.0", - "budo": "^7.0.2", + "@babel/cli": "^7.0.0", + "@babel/core": "^7.0.0", + "@babel/preset-env": "^7.0.0", + "@babel/preset-react": "^7.0.0", + "babelify": "^10.0.0", + "budo": "^11.6.3", "react": "^15.0.1", "react-dom": "^15.0.1" },