1
- import { Section , sectionNames } from "lowcoder-design" ;
1
+ import { ScrollBar , Section , sectionNames } from "lowcoder-design" ;
2
2
import { UICompBuilder , withDefault } from "../../generators" ;
3
3
import { NameConfigHidden , NameConfig , withExposingConfigs } from "../../generators/withExposing" ;
4
4
import ReactJson , { type ThemeKeys } from "react-json-view" ;
@@ -41,8 +41,6 @@ const bgColorMap = {
41
41
const JsonExplorerContainer = styled . div < {
42
42
$theme : keyof typeof bgColorMap ;
43
43
$animationStyle : AnimationStyleType ;
44
- $height : boolean ;
45
- $showVerticalScrollbar :boolean ;
46
44
} > `
47
45
${ ( props ) => props . $animationStyle }
48
46
height: 100%;
@@ -51,10 +49,6 @@ const JsonExplorerContainer = styled.div<{
51
49
border: 1px solid #d7d9e0;
52
50
border-radius: 4px;
53
51
padding: 10px;
54
- &::-webkit-scrollbar {
55
- width: 16px;
56
- display: ${ props => props . $showVerticalScrollbar && 'block !important' } ;
57
- }
58
52
` ;
59
53
60
54
let JsonExplorerTmpComp = ( function ( ) {
@@ -72,21 +66,21 @@ let JsonExplorerTmpComp = (function () {
72
66
73
67
return (
74
68
< JsonExplorerContainer
75
- $height = { props . autoHeight }
76
69
$theme = { props . theme as keyof typeof bgColorMap }
77
70
$animationStyle = { props . animationStyle }
78
- $showVerticalScrollbar = { props . showVerticalScrollbar }
79
71
>
80
- < ReactJson
81
- name = { false }
82
- src = { props . value }
83
- theme = { props . theme as ThemeKeys }
84
- collapsed = { ! props . expandToggle }
85
- displayDataTypes = { false }
86
- indentWidth = { props . indent }
87
- />
72
+ < ScrollBar hideScrollbar = { ! props . showVerticalScrollbar } >
73
+ < ReactJson
74
+ name = { false }
75
+ src = { props . value }
76
+ theme = { props . theme as ThemeKeys }
77
+ collapsed = { ! props . expandToggle }
78
+ displayDataTypes = { false }
79
+ indentWidth = { props . indent }
80
+ />
81
+ </ ScrollBar >
88
82
</ JsonExplorerContainer >
89
- )
83
+ ) ;
90
84
} )
91
85
. setPropertyViewFn ( ( children ) => {
92
86
return (
0 commit comments