react-scroll-into-view
Advanced tools
Comparing version 1.0.4 to 1.1.0-rc2
{ | ||
"name": "react-scroll-into-view", | ||
"version": "1.0.4", | ||
"version": "1.1.0-rc2", | ||
"description": "Simple React element that when clicked scrolls to any element on page", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -8,2 +8,5 @@ # React scroll-into-view | ||
## Changelog | ||
See [releases](releases) tab | ||
## Installation | ||
@@ -41,2 +44,3 @@ ``` | ||
| smooth | Boolean | true | Scroll behaviour; when true - transition animation will be smooth. Otherwise instant. | ||
| style | Object | `{display: 'inline'}` | CSS styles passed to element | ||
@@ -43,0 +47,0 @@ ## TODO |
import resolve from 'rollup-plugin-node-resolve' | ||
import babel from 'rollup-plugin-babel' | ||
import commonjs from 'rollup-plugin-commonjs' | ||
@@ -10,9 +11,10 @@ export default { | ||
}, | ||
external: [ | ||
'react', | ||
'prop-types', | ||
'recompose', | ||
], | ||
plugins: [ | ||
resolve(), | ||
commonjs({ | ||
include: 'node_modules/**', | ||
namedExports:{ | ||
'./node_modules/react/index.js': ['createFactory', 'Component','createElement'], | ||
} | ||
}), | ||
babel({ | ||
@@ -19,0 +21,0 @@ exclude: 'node_modules/**' |
@@ -5,4 +5,8 @@ import React from 'react' | ||
const ScrollInto = ({ children, scrollIntoView }) => ( | ||
<div onClick={scrollIntoView}> | ||
const defaultStyle = { | ||
display:'inline', | ||
} | ||
const ScrollInto = ({ children, scrollIntoView, style }) => ( | ||
<div style={{...defaultStyle, style}} onClick={scrollIntoView}> | ||
{children} | ||
@@ -15,2 +19,3 @@ </div> | ||
smooth: PropTypes.bool, | ||
style: PropTypes.object, | ||
} | ||
@@ -20,2 +25,3 @@ | ||
smooth: true, | ||
style: {} | ||
} | ||
@@ -22,0 +28,0 @@ |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
99109
2460
48
2
1