Skip to content

Commit

Permalink
Bug - Charts - CodeSandbox default imports (#4438)
Browse files Browse the repository at this point in the history
  • Loading branch information
dlabrecq authored Jan 21, 2025
1 parent 8d4da2a commit a4cb2af
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/documentation-framework/helpers/codesandbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -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']
};
Expand All @@ -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': {
Expand Down

0 comments on commit a4cb2af

Please sign in to comment.