Skip to content

Commit

Permalink
Update story preview component
Browse files Browse the repository at this point in the history
  • Loading branch information
pervoj committed Mar 31, 2024
1 parent 775eee1 commit 96ab5c5
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/stories/components/StoryPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,20 @@ import { Canvas, Controls } from "@storybook/blocks";
import { StoryObj } from "@storybook/react";
import React from "react";

export default function StoryPreview({ story }: { story: StoryObj }) {
export default function StoryPreview({
title,
story,
}: {
title?: string;
story: StoryObj;
}) {
return (
<>
{title && (
<p role="heading" style={{ fontSize: "1rem", fontWeight: 700 }}>
{title}
</p>
)}
<Canvas of={story}></Canvas>
<Controls of={story} />
</>
Expand Down

0 comments on commit 96ab5c5

Please sign in to comment.