File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
packages/preview-server/src/components Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -13,19 +13,20 @@ import { Tooltip } from './tooltip';
1313
1414interface CodeContainerProps {
1515 markups : MarkupProps [ ] ;
16- filename : string ;
16+ basename : string ;
1717 activeLang : string ;
1818 setActiveLang : ( lang : string ) => void ;
1919}
2020
2121interface MarkupProps {
2222 language : Language ;
23+ extension ?: string ;
2324 content : string ;
2425}
2526
2627export const CodeContainer : React . FC < Readonly < CodeContainerProps > > = ( {
2728 markups,
28- filename,
29+ basename : filename ,
2930 activeLang,
3031 setActiveLang,
3132} ) => {
@@ -84,7 +85,7 @@ export const CodeContainer: React.FC<Readonly<CodeContainerProps>> = ({
8485 < CopyToClipboardButton content = { activeMarkup . content } />
8586 < DownloadButton
8687 content = { activeMarkup . content }
87- filename = { `${ filename } .${ activeMarkup . language } ` }
88+ filename = { `${ filename } .${ activeMarkup . extension || activeMarkup . language } ` }
8889 />
8990 </ div >
9091 < div className = "h-[calc(100%-2.25rem)]" >
You can’t perform that action at this time.
0 commit comments