clickable-box
Advanced tools
Comparing version 0.0.9 to 0.0.10
@@ -169,3 +169,3 @@ 'use strict'; | ||
var _this$props = this.props, | ||
is = _this$props.is, | ||
Component = _this$props.is, | ||
style = _this$props.style, | ||
@@ -175,3 +175,3 @@ innerRef = _this$props.innerRef, | ||
return React.createElement(is, objectAssign({}, { | ||
return React.createElement(Component, _extends({ | ||
tabIndex: 0, | ||
@@ -178,0 +178,0 @@ role: "button", |
{ | ||
"version": 2, | ||
"alias": ["clickable-box"], | ||
"builds": [{ "src": "package.json", "use": "@now/static-build" }] | ||
"builds": [ | ||
{ | ||
"src": "package.json", | ||
"use": "@now/static-build", | ||
"config": { "distDir": ".storybook/dist" } | ||
} | ||
] | ||
} |
{ | ||
"name": "clickable-box", | ||
"description": "Add `onClick` to HTML elements without sacrificing accessibility.", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"author": "Daniel O'Connor <daniel@danoc.me>", | ||
"license": "MIT", | ||
"main": "dist/index.cjs.js", | ||
@@ -13,22 +15,5 @@ "module": "dist/index.es.js", | ||
"prepublishOnly": "rollup -c=./rollup.config.js", | ||
"now-build": "build-storybook --output-dir dist" | ||
"release": "yarn publish && git push --follow-tags", | ||
"now-build": "build-storybook --output-dir .storybook/dist" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/danoc/clickable-box.git" | ||
}, | ||
"peerDependencies": { | ||
"prop-types": "^15.0.0", | ||
"react": "^16.3.0", | ||
"react-dom": "^16.0.0" | ||
}, | ||
"author": "Daniel O'Connor <daniel@danoc.me>", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/danoc/clickable-box/issues" | ||
}, | ||
"homepage": "https://github.com/danoc/clickable-box#readme", | ||
"dependencies": { | ||
@@ -66,2 +51,18 @@ "object-assign": "^4.1.1" | ||
}, | ||
"peerDependencies": { | ||
"prop-types": "^15.0.0", | ||
"react": "^16.3.0", | ||
"react-dom": "^16.0.0" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/danoc/clickable-box.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/danoc/clickable-box/issues" | ||
}, | ||
"homepage": "https://github.com/danoc/clickable-box#readme", | ||
"husky": { | ||
@@ -68,0 +69,0 @@ "hooks": { |
@@ -28,17 +28,13 @@ import React from "react"; | ||
render() { | ||
const { is, style, innerRef, ...otherProps } = this.props; | ||
const { is: Component, style, innerRef, ...otherProps } = this.props; | ||
return React.createElement( | ||
is, | ||
objectAssign( | ||
{}, | ||
{ | ||
tabIndex: 0, | ||
role: "button", | ||
style: objectAssign({}, { cursor: "pointer" }, style), | ||
onKeyDown: this.onKeyDown, | ||
ref: innerRef | ||
}, | ||
otherProps | ||
) | ||
return ( | ||
<Component | ||
tabIndex={0} | ||
role="button" | ||
style={objectAssign({}, { cursor: "pointer" }, style)} | ||
onKeyDown={this.onKeyDown} | ||
ref={innerRef} | ||
{...otherProps} | ||
/> | ||
); | ||
@@ -45,0 +41,0 @@ } |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
19936
433
0