diff --git a/src/app/example/page.tsx b/src/app/example/page.tsx index d555b01f..817476a1 100644 --- a/src/app/example/page.tsx +++ b/src/app/example/page.tsx @@ -9,6 +9,7 @@ import { TextInput, } from "@/components"; import Profile from "@/components/profile/profile"; +import Searchbar from "@/components/searchbar/searchbar"; import WineImg from "@/components/wine-img/wine-img"; import React, { ChangeEvent } from "react"; @@ -110,6 +111,10 @@ const Page = () => { +
+ +
+
); diff --git a/src/components/searchbar/searchbar.stories.tsx b/src/components/searchbar/searchbar.stories.tsx new file mode 100644 index 00000000..ab42776e --- /dev/null +++ b/src/components/searchbar/searchbar.stories.tsx @@ -0,0 +1,35 @@ +import { Meta, StoryObj } from "@storybook/nextjs"; +import Searchbar from "./searchbar"; + +const meta: Meta = { + title: "Components/Searchbar", + component: Searchbar, + parameters: { + layout: "centered", + docs: { + description: { + component: "검색창 컴포넌트 입니다.", + }, + }, + }, + tags: ["autodocs"], + argTypes: {}, +}; + +export default meta; + +type Story = StoryObj; + +export const DefaultSearchbar: Story = { + args: {}, +}; + +export const ListSearchbar: Story = { + render: () => { + return ( +
+ +
+ ); + }, +}; diff --git a/src/components/searchbar/searchbar.tsx b/src/components/searchbar/searchbar.tsx new file mode 100644 index 00000000..8955fcfd --- /dev/null +++ b/src/components/searchbar/searchbar.tsx @@ -0,0 +1,36 @@ +import { cn } from "@/lib/utils"; +import Icon from "../icon/icon"; +import { ComponentProps } from "react"; + +/** + * 검색바 컴포넌트 + * @author hwitae + */ +const Searchbar = ({ ...props }: ComponentProps<"input">) => { + return ( + + ); +}; + +export default Searchbar;