react-custom-scrollbars-2
Advanced tools
Comparing version 4.4.0 to 4.5.0
@@ -41,3 +41,3 @@ # API | ||
* `universal`: (Boolean) Enable universal rendering (default: `false`) | ||
* [Learn how to use universal rendering](#link) | ||
* [Learn how to use universal rendering](usage.md#universal-rendering) | ||
@@ -44,0 +44,0 @@ ### Methods |
@@ -55,3 +55,9 @@ # Customization | ||
renderTrackHorizontal={({ style, ...props }) => | ||
<div {...props} style={{ ...style, backgroundColor: 'blue' }}/> | ||
<div {...props} style={{ | ||
...style, | ||
left: '50%', | ||
width: '100px', | ||
top: 0, | ||
transform: 'translateX(-50%)', | ||
}}> | ||
}> | ||
@@ -58,0 +64,0 @@ {this.props.children} |
@@ -26,3 +26,3 @@ # Usage | ||
name="viewport" | ||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/> | ||
content="width=device-width, initial-scale=1.0"/> | ||
``` | ||
@@ -29,0 +29,0 @@ |
@@ -30,7 +30,7 @@ // Type definitions for react-custom-scrollbars-2 4.0 | ||
renderView?: React.StatelessComponent<any>; | ||
renderTrackHorizontal?: React.StatelessComponent<any>; | ||
renderTrackVertical?: React.StatelessComponent<any>; | ||
renderThumbHorizontal?: React.StatelessComponent<any>; | ||
renderThumbVertical?: React.StatelessComponent<any>; | ||
renderView?: React.ComponentType<any>; | ||
renderTrackHorizontal?: React.ComponentType<any>; | ||
renderTrackVertical?: React.ComponentType<any>; | ||
renderThumbHorizontal?: React.ComponentType<any>; | ||
renderThumbVertical?: React.ComponentType<any>; | ||
@@ -37,0 +37,0 @@ tagName?: string; |
{ | ||
"name": "react-custom-scrollbars-2", | ||
"version": "4.4.0", | ||
"version": "4.5.0", | ||
"description": "React scrollbars component", | ||
@@ -73,4 +73,4 @@ "main": "lib/index.js", | ||
"peerDependencies": { | ||
"react": "^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0", | ||
"react-dom": "^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" | ||
"react": "^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0", | ||
"react-dom": "^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0" | ||
}, | ||
@@ -77,0 +77,0 @@ "dependencies": { |
195567