Skip to content

Commit

Permalink
remove codesandbox from docs (#10944)
Browse files Browse the repository at this point in the history
* remove codesandbox

* disable codesandbox only for react

* fix lint

---------

Co-authored-by: adrianspdev <adrian.dusinkiewicz@soppo.team>
  • Loading branch information
evanSe and adrianspdev committed May 13, 2024
1 parent f8a55a6 commit 0bd37c1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions docs/.vuepress/containers/examples/examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,17 @@ module.exports = function(docsVersion, base) {

tokens.splice(index + 1, 0, ...newTokens);
const isAngular = /angular(-.*)?/.test(preset);
const isReact = /react(-.*)?/.test(preset);

const displayJsFiddle = Boolean(!noEdit && !isAngular);

return `
<div class="tabs-button-wrapper">
<div class="tabs-button-list">
${Boolean(!noEdit) && stackblitz(id, htmlContent, codeToCompileSandbox, cssContent, docsVersion, preset)}
${Boolean(!noEdit) && codesandbox(id, htmlContent, codeToCompileSandbox, cssContent, docsVersion, preset)}
${!noEdit ? stackblitz(id, htmlContent, codeToCompileSandbox, cssContent, docsVersion, preset) : ''}
${!noEdit && !isReact
? codesandbox(id, htmlContent, codeToCompileSandbox, cssContent, docsVersion, preset)
: ''}
${displayJsFiddle ? jsfiddle(id, htmlContent, codeForPreset, cssContent, docsVersion, preset) : ''}
</div>
<tabs
Expand Down

0 comments on commit 0bd37c1

Please sign in to comment.