mirror of
https://github.com/mathuo/dockview
synced 2025-02-02 06:25:44 +00:00
chore: fix docs build
This commit is contained in:
parent
9c091f5126
commit
f6e816fa10
@ -3,7 +3,7 @@
|
||||
"version": "1.13.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "npm run create-templates && docusaurus build",
|
||||
"build": "npm run build-templates && docusaurus build",
|
||||
"clear": "docusaurus clear",
|
||||
"start": "concurrently \"docusaurus start\" \"npm run start-esm-server\"",
|
||||
"start-esm-server": "node web-server/index.mjs",
|
||||
|
@ -5,15 +5,11 @@ import BrowserOnly from '@docusaurus/BrowserOnly';
|
||||
const BASE_SANDBOX_URL =
|
||||
'https://codesandbox.io/s/github/mathuo/dockview/tree/master/packages/docs';
|
||||
|
||||
export const _CodeRunner = (props: {
|
||||
id: string;
|
||||
framework: string;
|
||||
height: number;
|
||||
}) => {
|
||||
useActiveFramework();
|
||||
export const _CodeRunner = (props: { id: string; height: number }) => {
|
||||
const [framework] = useActiveFramework();
|
||||
|
||||
const sandboxUrl = `${BASE_SANDBOX_URL}/templates/${props.id}/${props.framework}`;
|
||||
const path = `/templates/${props.id}/${props.framework}/index.html`;
|
||||
const sandboxUrl = `${BASE_SANDBOX_URL}/templates/${props.id}/${framework}`;
|
||||
const path = `/templates/${props.id}/${framework}/index.html`;
|
||||
return (
|
||||
<div>
|
||||
<iframe
|
||||
@ -35,15 +31,7 @@ export const _CodeRunner = (props: {
|
||||
};
|
||||
|
||||
export const CodeRunner = (props: { id: string; height: number }) => {
|
||||
const [framework] = useActiveFramework();
|
||||
|
||||
return (
|
||||
<BrowserOnly>
|
||||
{() => (
|
||||
<_CodeRunner {...props} framework={framework.toLowerCase()} />
|
||||
)}
|
||||
</BrowserOnly>
|
||||
);
|
||||
return <BrowserOnly>{() => <_CodeRunner {...props} />}</BrowserOnly>;
|
||||
};
|
||||
|
||||
const CodeSandbox = (props: { url: string }) => {
|
||||
|
Loading…
Reference in New Issue
Block a user