1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -70,24 +70,25 @@ const Type = styled(Text)`
70
70
transition: opacity ${ TransitionDuration . REG } ms;
71
71
`
72
72
73
- const Title = styled ( Text ) < TextProps & { kind : TreeNodeKind } > `
74
- cursor: ${ ( { kind } ) =>
75
- [ "folder" , "table" , "matview" ] . includes ( kind ) ? "pointer" : "initial" } ;
76
-
73
+ const Title = styled ( Text ) `
77
74
.highlight {
78
75
background-color: #7c804f;
79
76
color: ${ ( { theme } ) => theme . color . foreground } ;
80
77
}
81
78
`
82
79
83
- const Wrapper = styled . div `
80
+ const Wrapper = styled . div < { $isExpandable : boolean } > `
84
81
position: relative;
85
82
display: flex;
86
83
flex-direction: column;
87
84
padding: 0.5rem 0;
88
85
padding-left: 1rem;
89
86
padding-right: 1rem;
90
87
transition: background ${ TransitionDuration . REG } ms;
88
+ user-select: none;
89
+ ${ ( { $isExpandable } ) => $isExpandable && `
90
+ cursor: pointer;
91
+ ` }
91
92
92
93
&:hover,
93
94
&:active {
@@ -103,8 +104,8 @@ const StyledTitle = styled(Title)`
103
104
flex-shrink: 0;
104
105
margin-right: 1rem;
105
106
106
- mark {
107
- background-color: #45475a !important ;
107
+ .highlight {
108
+ background-color: #45475a;
108
109
color: ${ ( { theme } ) => theme . color . foreground } ;
109
110
}
110
111
`
@@ -230,6 +231,7 @@ const Row = ({
230
231
231
232
return (
232
233
< Wrapper
234
+ $isExpandable = { isExpandable }
233
235
data-hook = { dataHook ?? "schema-row" }
234
236
className = { className }
235
237
onClick = { ( e ) => {
@@ -281,7 +283,6 @@ const Row = ({
281
283
< StyledTitle
282
284
color = "foreground"
283
285
ellipsis
284
- kind = { kind }
285
286
data-hook = { `schema-${ kind } -title` }
286
287
>
287
288
{ isTableKind && (
0 commit comments