File tree Expand file tree Collapse file tree 2 files changed +27
-20
lines changed
src/app/story/[id]/_components/StoryDetailContent Expand file tree Collapse file tree 2 files changed +27
-20
lines changed Original file line number Diff line number Diff line change 11import { style } from "@vanilla-extract/css" ;
2+ import { recipe } from "@vanilla-extract/recipes" ;
23
34import { radius , semantic } from "@/styles" ;
45
@@ -37,24 +38,24 @@ export const storyImageArea = style({
3738 height : "100%" ,
3839} ) ;
3940
40- export const leftZone = style ( {
41- position : "absolute" ,
42- top : 0 ,
43- left : 0 ,
44- width : "50%" ,
45- height : "100%" ,
46- cursor : "pointer" ,
47- zIndex : 5 ,
48- } ) ;
49-
50- export const rightZone = style ( {
51- position : "absolute" ,
52- top : 0 ,
53- right : 0 ,
54- width : "50%" ,
55- height : "100%" ,
56- cursor : "pointer " ,
57- zIndex : 5 ,
41+ export const zone = recipe ( {
42+ base : {
43+ position : "absolute" ,
44+ top : 0 ,
45+ width : "50%" ,
46+ height : "100%" ,
47+ cursor : "pointer" ,
48+ zIndex : 5 ,
49+ } ,
50+ variants : {
51+ side : {
52+ left : { left : 0 } ,
53+ right : { right : 0 } ,
54+ } ,
55+ } ,
56+ defaultVariants : {
57+ side : "left " ,
58+ } ,
5859} ) ;
5960
6061export const informationContent = style ( {
Original file line number Diff line number Diff line change @@ -81,8 +81,14 @@ export const StoryDetailContent = ({ storyId }: StoryDetailContentProps) => {
8181 </ div >
8282
8383 < div className = { styles . storyImageArea } >
84- < button className = { styles . leftZone } onClick = { handlePrevStory } />
85- < button className = { styles . rightZone } onClick = { handleNextStory } />
84+ < button
85+ className = { styles . zone ( { side : "left" } ) }
86+ onClick = { handlePrevStory }
87+ />
88+ < button
89+ className = { styles . zone ( { side : "right" } ) }
90+ onClick = { handleNextStory }
91+ />
8692 < Image
8793 src = { story . imageUrl }
8894 alt = { `${ story . storeName } 스토리` }
You can’t perform that action at this time.
0 commit comments