Skip to content

Commit

Permalink
open in code sandbox and stackblitz
Browse files Browse the repository at this point in the history
  • Loading branch information
lerte committed May 31, 2024
1 parent 61455e6 commit 3df5b3d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 21 deletions.
42 changes: 23 additions & 19 deletions apps/docs/src/components/OpenInCodeSandbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,30 @@ const OpenInCodeSandbox = ({ title, code }: OpenInCodeSandboxProps) => {
const parameters = getParameters({
files: {
'package.json': {
content: JSON.stringify({
name: `actify-${title}`,
private: true,
version: '0.0.0',
scripts: {
dev: 'vite'
content: JSON.stringify(
{
name: `actify-${title}`,
private: true,
version: '0.0.0',
scripts: {
dev: 'vite'
},
dependencies: {
[name]: `^${version}`,
react: 'rc',
'react-dom': 'rc'
},
devDependencies: {
'@vitejs/plugin-react': '^1.3.0',
autoprefixer: '^10.4.5',
postcss: '^8.4.13',
tailwindcss: 'latest',
vite: '^4.5.1'
}
},
dependencies: {
[name]: `^${version}`,
react: 'rc',
'react-dom': 'rc'
},
devDependencies: {
'@vitejs/plugin-react': '^1.3.0',
autoprefixer: '^10.4.5',
postcss: '^8.4.13',
tailwindcss: 'latest',
vite: '^4.5.1'
}
}),
null,
2
),
isBinary: false
},
'App.jsx': {
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/src/components/OpenInStackblitz.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ ReactDOM.createRoot(document.getElementById('root')).render(
},
"dependencies": {
"${name}": "^${version}",
react: 'rc',
'react-dom': 'rc'
"react": "rc",
"react-dom": "rc"
},
"devDependencies": {
"@vitejs/plugin-react": "^1.3.0",
Expand Down

0 comments on commit 3df5b3d

Please sign in to comment.