File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -180,6 +180,7 @@ const Container = styled.div`
180180` ;
181181
182182const Column = styled . div `
183+ width: 100%;
183184 display: flex;
184185 flex-direction: column;
185186 align-items: center;
@@ -196,6 +197,7 @@ const Label = styled.div`
196197` ;
197198
198199const LetterWrapper = styled . div `
200+ width: 100%;
199201 display: flex;
200202 flex-direction: column;
201203 justify-content: center;
Original file line number Diff line number Diff line change @@ -529,7 +529,7 @@ const PlanetPage = () => {
529529 </ BottomWrapper >
530530 { showTooltip && (
531531 < Tooltip
532- message = " 궤도에 있는 편지들을 끌어 당겨 행성으로 옮길 수 있어요"
532+ message = { ` 궤도에 있는 편지들을 끌어 당겨 행성으로 \n옮길 수있어요` }
533533 close = { true }
534534 bottom = "230px"
535535 onClose = { ( ) => setShowTooltip ( false ) }
Original file line number Diff line number Diff line change @@ -150,6 +150,7 @@ const Container = styled.div`
150150` ;
151151
152152const Column = styled . div `
153+ width: 100%;
153154 display: flex;
154155 flex-direction: column;
155156 align-items: center;
@@ -166,6 +167,7 @@ const Label = styled.div`
166167` ;
167168
168169const LetterWrapper = styled . div `
170+ width: 100%;
169171 display: flex;
170172 flex-direction: column;
171173 justify-content: center;
Original file line number Diff line number Diff line change @@ -36,6 +36,9 @@ const Tooltip = (props: ToolTipProps) => {
3636 setIsVisible ( true ) ;
3737 } , 1000 ) ;
3838 } , [ ] ) ;
39+
40+ const [ firstLine , secondLine ] = message . split ( "\n" ) ;
41+
3942 return (
4043 shouldRender && (
4144 < TooltipContainer
@@ -46,7 +49,10 @@ const Tooltip = (props: ToolTipProps) => {
4649 $right = { right }
4750 $padding = { padding }
4851 >
49- < Message > { message } </ Message >
52+ < Message >
53+ < span > { firstLine } </ span >
54+ { secondLine && < span className = "second-line" > { secondLine } </ span > }
55+ </ Message >
5056 { close && (
5157 < CloseButton onClick = { handleClose } >
5258 < Image
@@ -72,7 +78,9 @@ const TooltipContainer = styled.div<{
7278 $right ?: string ;
7379 $padding ?: string ;
7480} > `
75- width: calc(100% - 50px);
81+ max-width: calc(100% - 50px);
82+ min-width: 280px;
83+ width: auto;
7684 padding: ${ ( { $padding } ) => ( $padding ? $padding : "8px 14px" ) } ;
7785 display: flex;
7886 justify-content: space-between;
@@ -111,11 +119,24 @@ const TooltipContainer = styled.div<{
111119` ;
112120
113121const Message = styled . div `
114- width: 100%;
115- display: flex;
116- justify-content: space-between;
117- align-items: center;
118- gap: 5px;
122+ display: inline;
123+ white-space: nowrap;
124+
125+ span {
126+ display: inline;
127+ }
128+
129+ .second-line {
130+ display: inline;
131+ }
132+
133+ @media (max-width: 380px) {
134+ white-space: normal;
135+
136+ .second-line {
137+ display: block; /* 공간이 부족할 때 줄바꿈 */
138+ }
139+ }
119140` ;
120141
121142const CloseButton = styled . button `
Original file line number Diff line number Diff line change @@ -264,7 +264,6 @@ const Container = styled.div<{
264264 height: auto;
265265 padding: ${ ( { $padding } ) => ( $padding ? $padding : "34px" ) } ;
266266 max-width: ${ ( { $width } ) => ( $width ? $width : "345px" ) } ;
267- min-width: ${ ( { $width } ) => ( $width ? $width : "345px" ) } ;
268267 max-height: ${ ( { $height } ) => ( $height ? $height : "349px" ) } ;
269268 min-height: ${ ( { $height } ) => ( $height ? $height : "349px" ) } ;
270269 background-image: ${ ( { $templateType } ) =>
You can’t perform that action at this time.
0 commit comments