-
Notifications
You must be signed in to change notification settings - Fork 25
/
index.tsx
20 lines (15 loc) · 756 Bytes
/
index.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*---------------------------------------------------------
* Copyright (C) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------*/
import { h, render } from 'preact';
import { AllItems } from './renderer';
import './renderer.css'; // only here for the bundler to pick it up
declare const scriptUrl: string;
const link = document.createElement('link');
link.rel = 'stylesheet';
link.href = scriptUrl.split('/').slice(0, -1).concat('renderer.css').join('/');
document.head.appendChild(link);
const api = acquireNotebookRendererApi('github-issues');
api.onDidCreateOutput(event => {
render(<AllItems items={Array.isArray(event.value) ? event.value : (event.value as any).items} />, event.element);
});