-
-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
54 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import React from 'react'; | ||
import { withStyles } from '@material-ui/core'; | ||
import DoubleScrollbar from 'react-double-scrollbar'; | ||
This comment has been minimized.
Sorry, something went wrong. |
||
|
||
const style = () => ({ | ||
horizontalScrollContainer: { | ||
'& ::-webkit-scrollbar': { | ||
'-webkit-appearance': 'none' | ||
}, | ||
'& ::-webkit-scrollbar:horizontal': { | ||
height: 8 | ||
}, | ||
'& ::-webkit-scrollbar-thumb': { | ||
borderRadius: 4, | ||
border: '2px solid white', | ||
backgroundColor: 'rgba(0, 0, 0, .3)' | ||
} | ||
} | ||
}); | ||
|
||
const ScrollBar = withStyles(style)(({ double, children, classes }) => { | ||
if (double) { | ||
return <DoubleScrollbar>{children}</DoubleScrollbar>; | ||
} else { | ||
return ( | ||
<div | ||
className={classes.horizontalScrollContainer} | ||
style={{ overflowX: 'auto', position: 'relative' }} | ||
> | ||
{children} | ||
</div> | ||
); | ||
} | ||
}); | ||
|
||
export default ScrollBar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This import cause error: DoubleScrollbar
Failed to parse source map from 'node_modules/react-double-scrollbar/dist/DoubleScrollbar.js.map' file: Error: ENOENT: no such file or directory, open 'node_modules/react-double-scrollbar/dist/DoubleScrollbar.js.map'