From a4cb2af166e38f63021ac065ae37f60fce50218d Mon Sep 17 00:00:00 2001 From: Dan Labrecque Date: Tue, 21 Jan 2025 14:49:49 -0500 Subject: [PATCH] Bug - Charts - CodeSandbox default imports (#4438) --- packages/documentation-framework/helpers/codesandbox.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/documentation-framework/helpers/codesandbox.js b/packages/documentation-framework/helpers/codesandbox.js index 798208aee4..5980e2585d 100644 --- a/packages/documentation-framework/helpers/codesandbox.js +++ b/packages/documentation-framework/helpers/codesandbox.js @@ -155,7 +155,7 @@ function getReactParams(title, code, scope, lang, relativeImports, relPath, sour const [ relImportStatement, _relImportItems, _relImportPath ] = relImportMatch; code = code.replace(relImportStatement, ''); } - + const dependencies = { '@patternfly/react-core': versions.Releases[0].versions['@patternfly/react-core'] }; @@ -181,6 +181,10 @@ function getReactParams(title, code, scope, lang, relativeImports, relPath, sour dependencies[res] = dependencies[res] || 'latest'; } + if (dependencies.hasOwnProperty('@patternfly/react-charts')) { + dependencies['victory'] = 'latest'; + } + return { files: { 'index.html': {