Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/components/Carousel.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
type carouselProps = {
text: string;
numItems?: number;

}

export default function Carousel({text,numItems}: carouselProps) {

return (
<div className= 'bg-blue-800'>
{text}
<p>There are {numItems} items.</p>
</div>
);
}
17 changes: 17 additions & 0 deletions src/stories/carousel.stories.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import type { Meta, StoryObj } from '@storybook/react-vite';

import Carousel from '@/components/Carousel';

const meta = {
component: Carousel,
} satisfies Meta<typeof Carousel>;

export default meta;
type Story = StoryObj<typeof meta>;

export const Primary: Story = {
args: {
text: "This is a carousel",
numItems: 3,
},
};