Skip to content

Commit 7bac931

Browse files
committed
update StackBlitz
1 parent d253703 commit 7bac931

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

docs/EmbeddedStackBlitz.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
11
import sdk from '@stackblitz/sdk';
2-
import type { CSSProperties } from 'react';
32
import { useEffect, useRef } from 'react';
43

54
interface EmbeddedStackBlitzProps {
6-
style?: CSSProperties;
7-
projectId: string;
5+
repoPath: string;
86
}
97

10-
export function EmbeddedStackBlitz({ style, projectId }: EmbeddedStackBlitzProps) {
8+
export function EmbeddedStackBlitz({ repoPath }: EmbeddedStackBlitzProps) {
119
const containerRef = useRef<HTMLDivElement | null>(null);
1210

1311
useEffect(() => {
1412
const container = containerRef.current;
1513
if (!container) {
1614
return;
1715
}
18-
sdk.embedProjectId(container, projectId, {
16+
sdk.embedGithubProject(container, repoPath, {
1917
openFile: 'src/App.tsx',
2018
view: 'editor',
2119
height: '90%',
@@ -28,9 +26,9 @@ export function EmbeddedStackBlitz({ style, projectId }: EmbeddedStackBlitzProps
2826
container.innerHTML = '';
2927
}
3028
};
31-
}, [projectId]);
29+
}, [repoPath]);
3230

33-
return <div ref={containerRef} data-where style={{ height: '80vh', ...style }} />;
31+
return <div ref={containerRef} />;
3432
}
3533

3634
EmbeddedStackBlitz.displayName = 'EmbeddedStackBlitz';

docs/UXCIntegration.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ function UXCIntegration() {
77
return (
88
<div style={{ height: '80vh', position: 'relative' }}>
99
<ThemeProvider>
10-
<UXCIntegrationApp content={<EmbeddedStackBlitz projectId={'github-k5xmevmm'} />} />
10+
<UXCIntegrationApp
11+
content={<EmbeddedStackBlitz repoPath="SAP/ui5-webcomponents-react/tree/main/patterns/navigation-layout" />}
12+
/>
1113
</ThemeProvider>
1214
</div>
1315
);

0 commit comments

Comments
 (0)