Skip to content

Commit

Permalink
Add Stackblitz logo
Browse files Browse the repository at this point in the history
  • Loading branch information
victortrinh2 committed Nov 13, 2024
1 parent ba018b4 commit 5881ef2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .storybook/components/canvas/Canvas.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import React, { ComponentProps } from "react";
import { ComponentProps } from "react";
import { Canvas as StorybookCanvas } from "@storybook/blocks";
import { Inline, Text } from "@components";

Check failure on line 3 in .storybook/components/canvas/Canvas.tsx

View workflow job for this annotation

GitHub Actions / Eslint

'Text' is defined but never used

Check failure on line 3 in .storybook/components/canvas/Canvas.tsx

View workflow job for this annotation

GitHub Actions / Build and Tests

'Text' is defined but never used

Check failure on line 3 in .storybook/components/canvas/Canvas.tsx

View workflow job for this annotation

GitHub Actions / Build and Tests

'Text' is defined but never used

Check failure on line 3 in .storybook/components/canvas/Canvas.tsx

View workflow job for this annotation

GitHub Actions / Eslint

'Text' is defined but never used
import { Stackblitz } from "./assets/index.tsx";
import { Image } from "@components/image/index.ts";

interface Props extends ComponentProps<typeof StorybookCanvas> { }

Expand All @@ -8,7 +11,12 @@ export const Canvas = (props: Props) => (
{...props}
additionalActions={[
{
title: "Open Orbiter Sandbox",
title: (
<Inline gap="inline-sm">
<Image src={Stackblitz} alt="Stackblitz" width="10px" height="auto" />
Open Orbiter Sandbox
</Inline>
),
onClick: () => {
window.open(
"https://stackblitz.com/edit/orbiter-sandbox?file=src%2FComponent.tsx",
Expand Down
3 changes: 3 additions & 0 deletions .storybook/components/canvas/assets/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Stackblitz from "./stackblitz.png";

export { Stackblitz };
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5881ef2

Please sign in to comment.