-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: RecommendList 컴포넌트 리팩토링 (#78)
* fix: Text 컴포넌트에서 as를 사용하지 않는 부분 해결 * refactor: MarkedText 스타일 마이그레이션 * refactor: RecommendList 컴포넌트 스타일 마이그레이션 * feat: 추천 검색어 옆에 '상품' 텍스트 추가
- Loading branch information
Showing
5 changed files
with
87 additions
and
66 deletions.
There are no files selected for viewing
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
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,8 @@ | ||
import { vars } from '@/styles/theme.css'; | ||
import { style } from '@vanilla-extract/css'; | ||
|
||
export const markText = style({ | ||
color: vars.colors.primary, | ||
fontWeight: 700, | ||
background: vars.colors.background.default, | ||
}); |
17 changes: 17 additions & 0 deletions
17
src/components/Search/RecommendList/RecommendList.stories.tsx
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,17 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import RecommendList from './RecommendList'; | ||
|
||
const meta: Meta<typeof RecommendList> = { | ||
title: 'search/RecommendList', | ||
component: RecommendList, | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
export const Default: Story = { | ||
args: { | ||
searchQuery: '꼬북칩', | ||
}, | ||
}; |
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
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,34 @@ | ||
import { vars } from '@/styles/theme.css'; | ||
import { style } from '@vanilla-extract/css'; | ||
|
||
export const container = style({ | ||
position: 'absolute', | ||
minWidth: 360, | ||
maxHeight: 150, | ||
padding: '10px 0', | ||
background: vars.colors.background.default, | ||
overflowY: 'auto', | ||
}); | ||
|
||
export const backdrop = style({ | ||
position: 'fixed', | ||
top: 0, | ||
left: 0, | ||
bottom: 0, | ||
right: 0, | ||
}); | ||
|
||
export const wrapper = style({ | ||
position: 'relative', | ||
width: '100%', | ||
}); | ||
|
||
export const productButton = style({ | ||
display: 'flex', | ||
alignItems: 'center', | ||
padding: '14px 0', | ||
color: '#232527', | ||
fontSize: '1.6rem', | ||
fontWeight: 400, | ||
textAlign: 'left', | ||
}); |