diff --git a/components/atoms/Profile/ProfileIcon.tsx b/components/atoms/Profile/ProfileIcon.tsx index 2864d9919..497bba72a 100644 --- a/components/atoms/Profile/ProfileIcon.tsx +++ b/components/atoms/Profile/ProfileIcon.tsx @@ -17,8 +17,7 @@ import { interface IProfileIcon { user: IUser | IUserRegisterForm | "guest" | "ABOUT"; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - size: any; + size: keyof typeof ICON_SIZE; isMember?: boolean; isImagePriority?: boolean; } diff --git a/components/atoms/skeleton/Skeleton.tsx b/components/atoms/skeleton/Skeleton.tsx index 72366676b..b736c7cf4 100644 --- a/components/atoms/skeleton/Skeleton.tsx +++ b/components/atoms/skeleton/Skeleton.tsx @@ -1,17 +1,15 @@ -import { Skeleton as ChakraSkeleton } from "@chakra-ui/react"; +import { Skeleton as ChakraSkeleton, SkeletonProps } from "@chakra-ui/react"; +import { PropsWithChildren } from "react"; -interface ISkeleton { - children: React.ReactNode; - isLoad?: boolean; -} +interface ISkeleton extends Pick {} -function Skeleton({ children, isLoad }: ISkeleton) { +function Skeleton({ children, isLoaded = false }: PropsWithChildren) { return ( diff --git a/modals/aboutHeader/promotionModal/PromotionModalDetail.tsx b/modals/aboutHeader/promotionModal/PromotionModalDetail.tsx index e130eb0ea..e5d9257d9 100644 --- a/modals/aboutHeader/promotionModal/PromotionModalDetail.tsx +++ b/modals/aboutHeader/promotionModal/PromotionModalDetail.tsx @@ -23,7 +23,7 @@ function PromotionModalDetail() {
현재 참여 수 - + {applyCnt || ""}명(중복 포함) diff --git a/stories/atoms/badges/Badge.stories.ts b/stories/atoms/badges/Badge.stories.ts index 8ce5a54e4..3bf60b352 100644 --- a/stories/atoms/badges/Badge.stories.ts +++ b/stories/atoms/badges/Badge.stories.ts @@ -3,16 +3,13 @@ import type { Meta, StoryObj } from "@storybook/react"; import { Badge } from "../../../components/atoms/badges/Badges"; const meta = { - title: "ATOMS/Button/Badge", + title: "Atoms/Badge/Badge", component: Badge, - parameters: {}, tags: ["autodocs"], - argTypes: {}, - - args: {}, } satisfies Meta; export default meta; + type Story = StoryObj; export const Primary: Story = { diff --git a/stories/atoms/badges/OutlineBadge.stories.ts b/stories/atoms/badges/OutlineBadge.stories.ts new file mode 100644 index 000000000..b0fef3876 --- /dev/null +++ b/stories/atoms/badges/OutlineBadge.stories.ts @@ -0,0 +1,27 @@ +import type { Meta, StoryObj } from "@storybook/react"; + +import OutlineBadge from "../../../components/atoms/badges/OutlineBadge"; + +const meta = { + title: "Atoms/Badge/OutlineBadge", + component: OutlineBadge, + tags: ["autodocs"], +} satisfies Meta; + +export default meta; + +type Story = StoryObj; + +export const Primary: Story = { + args: { + colorScheme: "mintTheme", + text: "OutlineBadge", + }, +}; + +export const PrimarySizeSmall: Story = { + args: { + ...Primary.args, + size: "sm", + }, +}; diff --git a/stories/atoms/blocks/IconButtonColBlock.stories.tsx b/stories/atoms/blocks/IconButtonColBlock.stories.tsx new file mode 100644 index 000000000..696eed5eb --- /dev/null +++ b/stories/atoms/blocks/IconButtonColBlock.stories.tsx @@ -0,0 +1,39 @@ +import { faLock } from "@fortawesome/pro-light-svg-icons"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import type { Meta, StoryObj } from "@storybook/react"; + +import IconButtonColBlock from "../../../components/atoms/blocks/IconButtonColBlock"; + +const meta = { + title: "Atoms/Blocks/IconButtonColBlock", + component: IconButtonColBlock, + tags: ["autodocs"], +} satisfies Meta; + +export default meta; + +type Story = StoryObj; + +export const Primary: Story = { + args: { + props: { + icon: , + title: "I'm title prop", + buttonProp: { + text: "I'm Button's text prop", + func: () => {}, + }, + disabled: false, + }, + }, +}; + +export const PrimaryDisabled: Story = { + args: { + ...Primary.args, + props: { + ...Primary.args.props, + disabled: true, + }, + }, +}; diff --git a/stories/atoms/buttons/ArrowBackButton.stories.ts b/stories/atoms/buttons/ArrowBackButton.stories.ts index 55c83d41f..1624f2aa6 100644 --- a/stories/atoms/buttons/ArrowBackButton.stories.ts +++ b/stories/atoms/buttons/ArrowBackButton.stories.ts @@ -5,14 +5,11 @@ import { ArrowBackButtonUI } from "../../../components/atoms/buttons/ArrowBackBu const meta = { title: "ATOMS/Button/ArrowBackButton", component: ArrowBackButtonUI, - parameters: {}, tags: ["autodocs"], - argTypes: {}, - - args: {}, } satisfies Meta; export default meta; + type Story = StoryObj; export const Primary: Story = { diff --git a/stories/atoms/buttons/ArrowTextButton.stories.ts b/stories/atoms/buttons/ArrowTextButton.stories.ts index 231433197..c377b76f6 100644 --- a/stories/atoms/buttons/ArrowTextButton.stories.ts +++ b/stories/atoms/buttons/ArrowTextButton.stories.ts @@ -5,14 +5,11 @@ import ArrowTextButton from "../../../components/atoms/buttons/ArrowTextButton"; const meta = { title: "ATOMS/Button/ArrowTextButton", component: ArrowTextButton, - parameters: {}, tags: ["autodocs"], - argTypes: {}, - - args: {}, } satisfies Meta; export default meta; + type Story = StoryObj; export const Primary: Story = { diff --git a/stories/atoms/buttons/BasicButton.stories.ts b/stories/atoms/buttons/BasicButton.stories.ts index 1c23ea220..85783c9ac 100644 --- a/stories/atoms/buttons/BasicButton.stories.ts +++ b/stories/atoms/buttons/BasicButton.stories.ts @@ -6,7 +6,6 @@ import { BasicButton } from "../../../components/atoms/buttons/BasicButton"; const meta = { title: "ATOMS/Button/BasicButton", component: BasicButton, - parameters: {}, tags: ["autodocs"], argTypes: { backgroundColor: { control: "color" }, @@ -16,6 +15,7 @@ const meta = { } satisfies Meta; export default meta; + type Story = StoryObj; export const Primary: Story = { diff --git a/stories/atoms/buttons/HighlightedTextButton.stories.ts b/stories/atoms/buttons/HighlightedTextButton.stories.ts index f2254e0bd..fb4a4c793 100644 --- a/stories/atoms/buttons/HighlightedTextButton.stories.ts +++ b/stories/atoms/buttons/HighlightedTextButton.stories.ts @@ -5,14 +5,11 @@ import HighlightedTextButton from "../../../components/atoms/buttons/Highlighted const meta = { title: "ATOMS/Button/HighlightedTextButton", component: HighlightedTextButton, - parameters: {}, tags: ["autodocs"], - argTypes: {}, - - args: {}, } satisfies Meta; export default meta; + type Story = StoryObj; export const Primary: Story = { diff --git a/stories/atoms/buttons/ShadowBlockButton.stories.ts b/stories/atoms/buttons/ShadowBlockButton.stories.ts index 6c2277ad8..58bc75a15 100644 --- a/stories/atoms/buttons/ShadowBlockButton.stories.ts +++ b/stories/atoms/buttons/ShadowBlockButton.stories.ts @@ -5,14 +5,11 @@ import ShadowBlockButton from "../../../components/atoms/buttons/ShadowBlockButt const meta = { title: "ATOMS/Button/ShadowBlockButton", component: ShadowBlockButton, - parameters: {}, tags: ["autodocs"], - argTypes: {}, - - args: {}, } satisfies Meta; export default meta; + type Story = StoryObj; export const Primary: Story = { diff --git a/stories/atoms/buttons/ShadowCircleButton.stories.ts b/stories/atoms/buttons/ShadowCircleButton.stories.ts index 212162293..da4f69887 100644 --- a/stories/atoms/buttons/ShadowCircleButton.stories.ts +++ b/stories/atoms/buttons/ShadowCircleButton.stories.ts @@ -5,14 +5,11 @@ import ShadowCircleButton from "../../../components/atoms/buttons/ShadowCircleBu const meta = { title: "ATOMS/Button/ShadowCircleButton", component: ShadowCircleButton, - parameters: {}, tags: ["autodocs"], - argTypes: {}, - - args: {}, } satisfies Meta; export default meta; + type Story = StoryObj; export const Primary: Story = { diff --git a/stories/atoms/loaders/MainLoading.stories.tsx b/stories/atoms/loaders/MainLoading.stories.tsx new file mode 100644 index 000000000..0038a2dde --- /dev/null +++ b/stories/atoms/loaders/MainLoading.stories.tsx @@ -0,0 +1,17 @@ +import type { Meta, StoryObj } from "@storybook/react"; + +import { MainLoading } from "../../../components/atoms/loaders/MainLoading"; + +const meta = { + title: "Atoms/Loaders/MainLoading", + component: MainLoading, + tags: ["autodocs"], +} satisfies Meta; + +export default meta; + +type Story = StoryObj; + +export const Primary: Story = { + args: {}, +}; diff --git a/stories/atoms/profile/ProfileIcon.stories.tsx b/stories/atoms/profile/ProfileIcon.stories.tsx new file mode 100644 index 000000000..83d0a6836 --- /dev/null +++ b/stories/atoms/profile/ProfileIcon.stories.tsx @@ -0,0 +1,20 @@ +import type { Meta, StoryObj } from "@storybook/react"; + +import ProfileIcon from "../../../components/atoms/Profile/ProfileIcon"; + +const meta = { + title: "Atoms/Profile/ProfileIcon", + component: ProfileIcon, + tags: ["autodocs"], +} satisfies Meta; + +export default meta; + +type Story = StoryObj; + +export const Primary: Story = { + args: { + user: "ABOUT", + size: "md", + }, +}; diff --git a/stories/atoms/skeletons/Skeleton.stories.tsx b/stories/atoms/skeletons/Skeleton.stories.tsx new file mode 100644 index 000000000..b24915e40 --- /dev/null +++ b/stories/atoms/skeletons/Skeleton.stories.tsx @@ -0,0 +1,19 @@ +import type { Meta, StoryObj } from "@storybook/react"; + +import Skeleton from "../../../components/atoms/skeleton/Skeleton"; + +const meta = { + title: "Atoms/skeleton/Skeleton", + component: Skeleton, + tags: ["autodocs"], +} satisfies Meta; + +export default meta; + +type Story = StoryObj; + +export const Primary: Story = { + args: { + children: "I'm Skeleton's children", + }, +};