File tree Expand file tree Collapse file tree 1 file changed +35
-27
lines changed Expand file tree Collapse file tree 1 file changed +35
-27
lines changed Original file line number Diff line number Diff line change @@ -128,33 +128,41 @@ function DataExport({
128
128
} , [ ] ) ;
129
129
130
130
return (
131
- < Feature features = "organizations:discover-query" >
132
- { inProgress ? (
133
- < Button
134
- size = "sm"
135
- priority = "default"
136
- title = { t (
137
- "You can get on with your life. We'll email you when your data's ready."
138
- ) }
139
- disabled
140
- icon = { icon }
141
- >
142
- { t ( "We're working on it..." ) }
143
- </ Button >
144
- ) : (
145
- < Button
146
- onClick = { debounce ( handleDataExport , 500 ) }
147
- disabled = { disabled || false }
148
- size = "sm"
149
- priority = "default"
150
- title = { t (
151
- "Put your data to work. Start your export and we'll email you when it's finished."
152
- ) }
153
- icon = { icon }
154
- >
155
- { children ? children : t ( 'Export All to CSV' ) }
156
- </ Button >
157
- ) }
131
+ < Feature
132
+ features = "organizations:discover-query"
133
+ hookName = "feature-disabled:grid-editable-actions"
134
+ renderDisabled = { props =>
135
+ typeof props . children === 'function' ? props . children ( props ) : props . children
136
+ }
137
+ >
138
+ { ( { hasFeature} ) =>
139
+ inProgress ? (
140
+ < Button
141
+ size = "sm"
142
+ priority = "default"
143
+ title = { t (
144
+ "You can get on with your life. We'll email you when your data's ready."
145
+ ) }
146
+ disabled
147
+ icon = { icon }
148
+ >
149
+ { t ( "We're working on it..." ) }
150
+ </ Button >
151
+ ) : (
152
+ < Button
153
+ onClick = { debounce ( handleDataExport , 500 ) }
154
+ disabled = { Boolean ( disabled ) || ! hasFeature }
155
+ size = "sm"
156
+ priority = "default"
157
+ title = { t (
158
+ "Put your data to work. Start your export and we'll email you when it's finished."
159
+ ) }
160
+ icon = { icon }
161
+ >
162
+ { children ? children : t ( 'Export All to CSV' ) }
163
+ </ Button >
164
+ )
165
+ }
158
166
</ Feature >
159
167
) ;
160
168
}
You can’t perform that action at this time.
0 commit comments