-
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.
- 텍스트를 props로 주던것을 이미지로 대체함
- Loading branch information
Showing
3 changed files
with
3 additions
and
29 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 |
---|---|---|
@@ -1,28 +1,15 @@ | ||
import { H24, P16 } from '@/components/Text'; | ||
import * as S from './styles'; | ||
import { CommonResponseType } from '@/types/apis'; | ||
|
||
interface BannerProps { | ||
bInfo: Pick< | ||
CommonResponseType, | ||
'mt20id' | 'prfnm' | 'poster' | 'prfplcnm' | 'pcseguidance' | 'prfpdfrom' | 'prfpdto' | ||
>; | ||
src: string; | ||
width?: number; | ||
height?: number; | ||
} | ||
|
||
export const Banner = ({ bInfo, width = 100, height = 30 }: BannerProps) => { | ||
export const Banner = ({ src, width = 100, height = 30 }: BannerProps) => { | ||
return ( | ||
<S.Banner width={width} height={height}> | ||
<img src={bInfo.poster} alt="banner"></img> | ||
<S.Text> | ||
<H24>{bInfo.prfnm}</H24> | ||
<P16>{bInfo.prfplcnm}</P16> | ||
<P16>{bInfo.pcseguidance}</P16> | ||
<P16> | ||
{bInfo.prfpdfrom} - {bInfo.prfpdto} | ||
</P16> | ||
</S.Text> | ||
<img src={src} alt="banner"></img> | ||
</S.Banner> | ||
); | ||
}; |
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