Skip to content

Commit

Permalink
docs: show sources for referenced files
Browse files Browse the repository at this point in the history
  • Loading branch information
AriPerkkio committed Aug 28, 2024
1 parent 516dd3e commit 4ff9398
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ description: Use TutorialKit's React components for fun and profit.
---
import PackageManagerTabs from '@components/Tabs/PackageManagerTabs.astro'
import { Code } from '@astrojs/starlight/components';
import { Tabs, TabItem } from '@astrojs/starlight/components';
import themeCSS from '@tutorialkit/astro/default-theme.css?raw';

import Example from '@components/react-examples/Example.astro';
Expand All @@ -17,6 +18,8 @@ import sourceExampleSimpleEditor from '@components/react-examples/ExampleSimpleE
import sourceExampleFileTree from '@components/react-examples/ExampleFileTree?raw';
import sourceExampleCodeMirrorEditor from '@components/react-examples/ExampleCodeMirrorEditor?raw';
import sourceExampleTerminal from '@components/react-examples/ExampleTerminal?raw';
import sourceUseTheme from "@components/react-examples/hooks/useTheme?raw";
import sourceUseWebcontainer from "@components/react-examples/hooks/useWebcontainer?raw";

You can reuse TutorialKit's React components in your own applications. They are designed to work well with the [WebContainer API][webcontainers].

Expand Down Expand Up @@ -74,6 +77,17 @@ See a full example on [StackBlitz][stackblitz-example].
## Components
These examples have references to following files:
<Tabs syncKey="referenced-files">
<TabItem label="hooks/useTheme.ts">
<Code code={sourceUseTheme} lang="ts" class="limit-code-height" />
</TabItem>
<TabItem label="hooks/useWebcontainer.ts">
<Code code={sourceUseWebcontainer} lang="ts" class="limit-code-height" />
</TabItem>
</Tabs>
### `FileTree`
Expand Down

0 comments on commit 4ff9398

Please sign in to comment.