pcm-shared-components 0.0.63 → 0.0.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,6 +8,7 @@ import { getStorage, setStorage } from './service/local_storage';
8
8
  import PropTypes from 'prop-types';
9
9
  import { ThemeProvider } from '@mui/system';
10
10
  import { createTheme, useTheme } from '@mui/material/styles';
11
+ import PCMScrollbar from '../../Tools/PCMScrollbar';
11
12
  /**
12
13
  * Displays an image that can is used to draw on to generate maps with highlighted routes.
13
14
  *
@@ -132,8 +133,11 @@ export const ImageCanvasDraw = props => {
132
133
  showDownloadButton: showDownloadButton
133
134
  }), /*#__PURE__*/React.createElement(DrawerButtonOpenClose, null, /*#__PURE__*/React.createElement(ChevronLeftIcon, null))) : /*#__PURE__*/React.createElement("div", {
134
135
  className: "flex flex-row justify-end"
135
- }, /*#__PURE__*/React.createElement(DrawerButtonOpenClose, null, /*#__PURE__*/React.createElement(ChevronRightIcon, null))), state.width !== 0 && /*#__PURE__*/React.createElement("div", {
136
- className: "overflow-scroll"
136
+ }, /*#__PURE__*/React.createElement(DrawerButtonOpenClose, null, /*#__PURE__*/React.createElement(ChevronRightIcon, null))), state.width !== 0 && /*#__PURE__*/React.createElement(PCMScrollbar, {
137
+ className: "overflow-scroll",
138
+ style: {
139
+ maxHeight: '90vh'
140
+ }
137
141
  }, /*#__PURE__*/React.createElement(CanvasDraw, {
138
142
  className: "",
139
143
  ref: saveableCanvas,
@@ -0,0 +1,24 @@
1
+ import { height } from '@mui/system';
2
+ import React from 'react';
3
+ import ImageCanvasDraw from '../../Drawing/ImageCanvasDraw';
4
+ import { cedarShade } from '../../Drawing/ImageCanvasDraw/storybook/testMap.test';
5
+
6
+ const ScrollingInnerDiv = () => {
7
+ return /*#__PURE__*/React.createElement("div", {
8
+ style: {
9
+ backgroundColor: 'yellow',
10
+ padding: 24,
11
+ height: 200
12
+ }
13
+ }, /*#__PURE__*/React.createElement("div", {
14
+ style: {
15
+ backgroundColor: 'blue',
16
+ height: '100%',
17
+ overflow: 'scroll'
18
+ }
19
+ }, /*#__PURE__*/React.createElement(ImageCanvasDraw, {
20
+ b64DataUrl: cedarShade
21
+ }), "CONTENT TO HAVE TAKING UP THE ENTIRE PARENT DIV SPACE CONTENT TO HAVE TAKING UP THE ENTIRE PARENT DIV SPACE CONTENT TO HAVE TAKING UP THE ENTIRE PARENT DIV SPACE CONTENT TO HAVE TAKING UP THE ENTIRE PARENT DIV SPACE CONTENT TO HAVE TAKING UP THE ENTIRE PARENT DIV SPACE CONTENT TO HAVE TAKING UP THE ENTIRE PARENT DIV SPACE CONTENT TO HAVE TAKING UP THE ENTIRE PARENT DIV SPACE CONTENT TO HAVE TAKING UP THE ENTIRE PARENT DIV SPACE CONTENT TO HAVE TAKING UP THE ENTIRE PARENT DIV SPACE CONTENT TO HAVE TAKING UP THE ENTIRE PARENT DIV SPACE CONTENT TO HAVE TAKING UP THE ENTIRE PARENT DIV SPACE CONTENT TO HAVE TAKING UP THE ENTIRE PARENT DIV SPACE CONTENT TO HAVE TAKING UP THE ENTIRE PARENT DIV SPACE CONTENT TO HAVE TAKING UP THE ENTIRE PARENT DIV SPACE CONTENT TO HAVE TAKING UP THE ENTIRE PARENT DIV SPACE CONTENT TO HAVE TAKING UP THE ENTIRE PARENT DIV SPACE CONTENT TO HAVE TAKING UP THE ENTIRE PARENT DIV SPACE CONTENT TO HAVE TAKING UP THE ENTIRE PARENT DIV SPACE CONTENT TO HAVE TAKING UP THE ENTIRE PARENT DIV SPACE CONTENT TO HAVE TAKING UP THE ENTIRE PARENT DIV SPACE CONTENT TO HAVE TAKING UP THE ENTIRE PARENT DIV SPACE"));
22
+ };
23
+
24
+ export default ScrollingInnerDiv;
@@ -10,23 +10,27 @@ export const PCMScrollbar = props => {
10
10
  const {
11
11
  children,
12
12
  className,
13
- enable
13
+ enable,
14
+ style
14
15
  } = props;
15
16
  return /*#__PURE__*/React.createElement(PerfectScrollbar, {
16
17
  key: props.id,
17
18
  className: clsx(className),
18
19
  style: enable && !isMobile ? {
19
20
  position: 'relative',
20
- overflow: 'hidden'
21
+ overflow: 'hidden',
22
+ ...style
21
23
  } : {}
22
24
  }, children);
23
25
  };
24
26
  export default PCMScrollbar;
25
27
  PCMScrollbar.propTypes = {
26
28
  className: PropTypes.any,
29
+ style: PropTypes.object,
27
30
  enable: PropTypes.bool
28
31
  };
29
32
  PCMScrollbar.defaultProps = {
30
33
  className: '',
34
+ style: {},
31
35
  enable: true
32
36
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pcm-shared-components",
3
- "version": "0.0.63",
3
+ "version": "0.0.64",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "babel": {