File tree Expand file tree Collapse file tree 2 files changed +23
-13
lines changed
compass-components/src/components
compass-export-to-language/src/components Expand file tree Collapse file tree 2 files changed +23
-13
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import { default as Badge } from '@leafygreen-ui/badge';
8
8
import { default as Banner } from '@leafygreen-ui/banner' ;
9
9
import Checkbox from '@leafygreen-ui/checkbox' ;
10
10
import Card from '@leafygreen-ui/card' ;
11
- import Code , { Language } from '@leafygreen-ui/code' ;
11
+ import Code , { Language , Panel } from '@leafygreen-ui/code' ;
12
12
import ConfirmationModal from '@leafygreen-ui/confirmation-modal' ;
13
13
import { default as LeafyGreenIcon } from '@leafygreen-ui/icon' ;
14
14
import type { Size as LeafyGreenIconSize } from '@leafygreen-ui/icon' ;
@@ -128,6 +128,7 @@ export {
128
128
Checkbox ,
129
129
Chip ,
130
130
Code ,
131
+ Panel ,
131
132
ConfirmationModal ,
132
133
Copyable ,
133
134
ExpandedContent ,
Original file line number Diff line number Diff line change 5
5
css ,
6
6
Label ,
7
7
Code ,
8
+ Panel ,
8
9
Checkbox ,
9
10
Banner ,
10
11
spacing ,
@@ -240,13 +241,16 @@ const ExportToLanguageModal: React.FunctionComponent<
240
241
className = { codeStyles }
241
242
id = "export-to-language-input"
242
243
data-testid = "export-to-language-input"
243
- languageOptions = { shellLanguageOptions }
244
- onChange = { ( ) => {
245
- // There is only one language option and we don't allow to change
246
- // the value
247
- } }
248
244
language = "Shell"
249
- copyable = { true }
245
+ panel = {
246
+ < Panel
247
+ languageOptions = { shellLanguageOptions }
248
+ onChange = { ( ) => {
249
+ // There is only one language option and we don't allow to change
250
+ // the value
251
+ } }
252
+ />
253
+ }
250
254
>
251
255
{ prettyInput }
252
256
</ Code >
@@ -266,13 +270,18 @@ const ExportToLanguageModal: React.FunctionComponent<
266
270
className = { codeStyles }
267
271
id = "export-to-language-output"
268
272
data-testid = "export-to-language-output"
269
- languageOptions = { languageOptions }
270
- onChange = { ( option : LanguageOption ) =>
271
- setOutputLanguage ( codeLanguageToOutputLanguage ( option . language ) )
272
- }
273
273
language = { outputLanguageToCodeLanguage ( outputLanguage ) }
274
- copyable = { true }
275
- onCopy = { trackCopiedOutput }
274
+ panel = {
275
+ < Panel
276
+ languageOptions = { shellLanguageOptions }
277
+ onCopy = { trackCopiedOutput }
278
+ onChange = { ( option : LanguageOption ) =>
279
+ setOutputLanguage (
280
+ codeLanguageToOutputLanguage ( option . language )
281
+ )
282
+ }
283
+ />
284
+ }
276
285
>
277
286
{ transpiledExpression || '' }
278
287
</ Code >
You can’t perform that action at this time.
0 commit comments