@@ -9,11 +9,16 @@ import { useTranslation } from 'react-i18next';
99import { useTheme } from '../../hooks/useTheme.ts' ;
1010type YamlViewerProps = {
1111 yamlString : string ;
12+ yamlStringToCopy : string ;
1213 filename : string ;
1314 showOnlyImportantData ?: boolean ;
1415 setShowOnlyImportantData ?: ( showOnlyImportantData : boolean ) => void ;
1516} ;
16- const YamlViewer : FC < YamlViewerProps > = ( { yamlString, filename } ) => {
17+
18+ // Download button is hidden now due to stakeholder request
19+ const SHOW_DOWNLOAD_BUTTON = false ;
20+
21+ const YamlViewer : FC < YamlViewerProps > = ( { yamlString, filename, yamlStringToCopy } ) => {
1722 const { t } = useTranslation ( ) ;
1823 const { isDarkTheme } = useTheme ( ) ;
1924 const { copyToClipboard } = useCopyToClipboard ( ) ;
@@ -32,12 +37,14 @@ const YamlViewer: FC<YamlViewerProps> = ({ yamlString, filename }) => {
3237 return (
3338 < div className = { styles . container } >
3439 < FlexBox className = { styles . buttons } direction = "Row" justifyContent = "End" alignItems = "Baseline" gap = { 16 } >
35- < Button icon = "copy" onClick = { ( ) => copyToClipboard ( yamlString ) } >
40+ < Button icon = "copy" onClick = { ( ) => copyToClipboard ( yamlStringToCopy ) } >
3641 { t ( 'buttons.copy' ) }
3742 </ Button >
38- < Button icon = "download" onClick = { downloadYaml } >
39- { t ( 'buttons.download' ) }
40- </ Button >
43+ { SHOW_DOWNLOAD_BUTTON && (
44+ < Button icon = "download" onClick = { downloadYaml } >
45+ { t ( 'buttons.download' ) }
46+ </ Button >
47+ ) }
4148 </ FlexBox >
4249 < SyntaxHighlighter
4350 language = "yaml"
0 commit comments