-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
39f04bc
commit c3b03d4
Showing
3 changed files
with
53 additions
and
3 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
import SearchGroup from '@/ui/Base/bookgroup/SearchGroup'; | ||
|
||
const meta: Meta<typeof SearchGroup> = { | ||
title: 'Base/SearchGroup', | ||
component: SearchGroup, | ||
tags: ['autodocs'], | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof SearchGroup>; | ||
|
||
const alertMessage = () => { | ||
document.getElementById('groupSearching')?.blur(); | ||
alert( | ||
` | ||
죄송합니다. | ||
검색 기능은 현재 준비중에 있습니다. 👀 | ||
` | ||
); | ||
}; | ||
|
||
export const Default: Story = { | ||
render: () => <SearchGroup handler={alertMessage} />, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { IconSearch } from '@public/icons'; | ||
|
||
interface SearchGroup { | ||
handler: () => void; | ||
} | ||
|
||
const SearchGroup = ({ handler }: SearchGroup) => { | ||
return ( | ||
<div className="flex"> | ||
<div className="rounded-bl-[0.4rem] rounded-tl-[0.4rem] border-[0.1rem] border-r-[0rem] border-solid border-black-100 bg-[#fffff] pl-[1rem] pt-[0.8rem]"> | ||
<IconSearch fill="#AFAFAF" /> | ||
</div> | ||
<input | ||
id="groupSearching" | ||
className="placeholder:text-Placeholder h-[3.7rem] w-full rounded-br-[0.4rem] rounded-tr-[0.4rem] border-[0.1rem] border-l-[0rem] border-black-100 pl-[2rem] text-[1.4rem] leading-[1.6rem] focus:outline-0" | ||
placeholder="모임을 검색해보세요" | ||
type="text" | ||
onClick={handler} | ||
/> | ||
</div> | ||
); | ||
}; | ||
|
||
export default SearchGroup; |