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';
88import { default as Banner } from '@leafygreen-ui/banner' ;
99import Checkbox from '@leafygreen-ui/checkbox' ;
1010import Card from '@leafygreen-ui/card' ;
11- import Code , { Language } from '@leafygreen-ui/code' ;
11+ import Code , { Language , Panel } from '@leafygreen-ui/code' ;
1212import ConfirmationModal from '@leafygreen-ui/confirmation-modal' ;
1313import { default as LeafyGreenIcon } from '@leafygreen-ui/icon' ;
1414import type { Size as LeafyGreenIconSize } from '@leafygreen-ui/icon' ;
@@ -128,6 +128,7 @@ export {
128128 Checkbox ,
129129 Chip ,
130130 Code ,
131+ Panel ,
131132 ConfirmationModal ,
132133 Copyable ,
133134 ExpandedContent ,
Original file line number Diff line number Diff line change 55 css ,
66 Label ,
77 Code ,
8+ Panel ,
89 Checkbox ,
910 Banner ,
1011 spacing ,
@@ -240,13 +241,16 @@ const ExportToLanguageModal: React.FunctionComponent<
240241 className = { codeStyles }
241242 id = "export-to-language-input"
242243 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- } }
248244 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+ }
250254 >
251255 { prettyInput }
252256 </ Code >
@@ -266,13 +270,18 @@ const ExportToLanguageModal: React.FunctionComponent<
266270 className = { codeStyles }
267271 id = "export-to-language-output"
268272 data-testid = "export-to-language-output"
269- languageOptions = { languageOptions }
270- onChange = { ( option : LanguageOption ) =>
271- setOutputLanguage ( codeLanguageToOutputLanguage ( option . language ) )
272- }
273273 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+ }
276285 >
277286 { transpiledExpression || '' }
278287 </ Code >
You can’t perform that action at this time.
0 commit comments