diff --git a/apps/storybook/package.json b/apps/storybook/package.json index 2f18189..9f17c02 100644 --- a/apps/storybook/package.json +++ b/apps/storybook/package.json @@ -9,7 +9,8 @@ "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview", "storybook": "storybook dev -p 6006", - "build-storybook": "storybook build" + "build-storybook": "storybook build", + "serve-storybook": "serve storybook-static" }, "dependencies": { "@radix-ui/react-accordion": "^1.1.2", diff --git a/apps/storybook/src/stories/Carousel.stories.tsx b/apps/storybook/src/stories/Carousel.stories.tsx index 196be02..41f10b9 100644 --- a/apps/storybook/src/stories/Carousel.stories.tsx +++ b/apps/storybook/src/stories/Carousel.stories.tsx @@ -1,6 +1,6 @@ import '../global.css'; -import type { Meta } from '@storybook/react'; -import { Carousel, type CarouselProps } from 'ui/components/carousel'; +import type { Meta, StoryFn } from '@storybook/react'; +import { Carousel } from 'ui/components/carousel'; import { AppleTemplateCard, IssueTemplateCard, @@ -48,7 +48,9 @@ const CAROUSEL_IMAGES = [ 'https://images.unsplash.com/photo-1488590528505-98d2b5aba04b?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2670&q=80', ]; -const Template = (args: CarouselProps) => ( +type Story = StoryFn; + +const Template: Story = (args) => (
{CAROUSEL_IMAGES.map((url, idx) => ( diff --git a/apps/storybook/vercel.json b/apps/storybook/vercel.json new file mode 100644 index 0000000..45fa3a1 --- /dev/null +++ b/apps/storybook/vercel.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://openapi.vercel.sh/vercel.json", + "buildCommand": "pnpm run build-storybook", + "devCommand": "pnpm run storybook", + "installCommand": "pnpm install", + "framework": null, + "outputDirectory": "./storybook-static" +} diff --git a/apps/web/components/examples-nav.tsx b/apps/web/components/examples-nav.tsx index b785f0d..1a627b7 100644 --- a/apps/web/components/examples-nav.tsx +++ b/apps/web/components/examples-nav.tsx @@ -73,8 +73,8 @@ export function ExampleCodeLink({ pathname }: ExampleCodeLinkProps) { rel='nofollow' className='absolute right-0 top-0 hidden items-center rounded-[0.5rem] text-sm font-semibold hover:underline md:flex' > - Source Code - + source code + ); } diff --git a/apps/web/components/mdx-components.tsx b/apps/web/components/mdx-components.tsx index 2f8bb28..f9660bb 100644 --- a/apps/web/components/mdx-components.tsx +++ b/apps/web/components/mdx-components.tsx @@ -189,7 +189,7 @@ const components = { <>
) => (