diff --git a/.storybook/main.ts b/.storybook/main.ts index 70ef005..c77ca56 100644 --- a/.storybook/main.ts +++ b/.storybook/main.ts @@ -4,7 +4,7 @@ import path from "path"; const config: StorybookConfig = { stories: [ "../components/**/*.stories.@(js|jsx|mjs|ts|tsx)", - "../app/**/*.stories.@(js|jsx|mjs|ts|tsx)", + "../docs/*.stories.mdx", ], addons: [ "@storybook/addon-links", @@ -13,6 +13,7 @@ const config: StorybookConfig = { "@storybook/addon-a11y", "@storybook/addon-designs", ], + staticDirs: ["../public", "../docs/assets"], webpackFinal: async (config) => { if (config && config.resolve && config.resolve.alias) { config.resolve.alias = { diff --git a/.storybook/manager.ts b/.storybook/manager.ts index 6acebf6..cce8129 100644 --- a/.storybook/manager.ts +++ b/.storybook/manager.ts @@ -6,7 +6,6 @@ const theme = create({ // Brand assets brandTitle: "NomadHair", - // TODO: Replace with real url. brandUrl: "https://nomadhair.co/", brandImage: "https://res.cloudinary.com/dtsdpcbcv/image/upload/v1712891768/logo-light-lg_pmi0xn.svg", diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx index 3eb96e6..c9e7def 100644 --- a/.storybook/preview.tsx +++ b/.storybook/preview.tsx @@ -48,6 +48,18 @@ const preview: Preview = { ...MINIMAL_VIEWPORTS, }, }, + options: { + storySort: { + method: "", + order: [ + "Getting Started", + "Style Guide", + "Atoms", + "Molecules", + "Organisms", + ], + }, + }, }, }; diff --git a/app/(protected)/my-appointments/components/appointmentDateTimePicker/appointmentDateTimePicker.tsx b/app/(protected)/my-appointments/components/appointmentDateTimePicker/appointmentDateTimePicker.tsx index ee83d64..b05e959 100644 --- a/app/(protected)/my-appointments/components/appointmentDateTimePicker/appointmentDateTimePicker.tsx +++ b/app/(protected)/my-appointments/components/appointmentDateTimePicker/appointmentDateTimePicker.tsx @@ -1,6 +1,6 @@ "use client"; -import { Calendar } from "@/components/atoms/calendar"; +import { Calendar } from "@/components/molecules/calendar"; import React, { useState } from "react"; import useSWR, { mutate } from "swr"; import AppointmentTimeslots from "./appointmentTimeslots"; diff --git a/components/atoms/avatar/avatar.stories.tsx b/components/atoms/avatar/avatar.stories.tsx index 7fe256f..dfaa146 100644 --- a/components/atoms/avatar/avatar.stories.tsx +++ b/components/atoms/avatar/avatar.stories.tsx @@ -1,6 +1,9 @@ import { Meta, StoryObj } from "@storybook/react"; import { Avatar, AvatarImage, AvatarFallback } from "./avatar"; +/** + * Avatar component is used to represent a user, and display the profile picture, initials or fallback icon. + */ const meta: Meta = { title: "Atoms/Avatar", component: Avatar, diff --git a/components/atoms/avatar/avatar.tsx b/components/atoms/avatar/avatar.tsx index 469947f..c227c02 100644 --- a/components/atoms/avatar/avatar.tsx +++ b/components/atoms/avatar/avatar.tsx @@ -6,7 +6,7 @@ import { cva, type VariantProps } from "class-variance-authority"; import { cn } from "@/lib/utils"; -const avatarVariatnts = cva( +const avatarVariants = cva( "relative flex shrink-0 overflow-hidden rounded-full", { variants: { @@ -24,7 +24,7 @@ const avatarVariatnts = cva( export interface AvatarProps extends React.ComponentPropsWithoutRef, - VariantProps {} + VariantProps {} const Avatar = React.forwardRef< React.ElementRef, @@ -32,7 +32,7 @@ const Avatar = React.forwardRef< >(({ className, size, ...props }, ref) => ( )); diff --git a/components/atoms/button/button.stories.tsx b/components/atoms/button/button.stories.tsx index 6a81675..49271b5 100644 --- a/components/atoms/button/button.stories.tsx +++ b/components/atoms/button/button.stories.tsx @@ -1,6 +1,11 @@ import { Meta, StoryObj } from "@storybook/react"; import { Button } from "./button"; -import { PlusIcon, icons } from "lucide-react"; +import { PlusIcon } from "lucide-react"; + +/** + * Button allows users to take action, and make choices, with a single step. + * The component can be used as native `