Skip to content

Commit 1670d42

Browse files
committed
chore: fix stylings (#develop)
1 parent a343d75 commit 1670d42

File tree

1 file changed

+28
-13
lines changed

1 file changed

+28
-13
lines changed

services/ahhachul.com/src/pages/my/setting.tsx

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,15 @@ const SettingPage: ActivityComponentType = () => {
154154
align-items: center;
155155
gap: 8px;
156156
width: 100%;
157-
justify-content: center;
157+
max-width: 100vw;
158+
overflow-x: auto;
159+
-ms-overflow-style: none;
160+
scrollbar-width: none;
161+
padding: 16px;
162+
white-space: nowrap;
163+
&::-webkit-scrollbar {
164+
display: none;
165+
}
158166
`}
159167
>
160168
{labeledStations.map(item => (
@@ -169,14 +177,16 @@ const SettingPage: ActivityComponentType = () => {
169177
gap: 8px;
170178
height: 28px;
171179
font-size: 12px;
172-
color: #ffffff;
180+
flex-shrink: 0;
181+
padding: 0 12px;
173182
`}
174183
>
175184
{item.stationName}
176185
<CloseIcon
177186
css={css`
178187
width: 16px;
179188
height: 16px;
189+
flex-shrink: 0;
180190
`}
181191
onClick={() => {
182192
setLabeledStations(
@@ -189,6 +199,10 @@ const SettingPage: ActivityComponentType = () => {
189199
</div>
190200
<SubmitBtn
191201
onClick={() => {
202+
if (!labeledStations.length) {
203+
alert('역을 하나 이상 선택해주세요.');
204+
return;
205+
}
192206
const formattedStations = labeledStations.map(station => ({
193207
name: station.stationName,
194208
label: LABEL_OPTIONS.find(l => l.id === station.label)?.text || '',
@@ -210,7 +224,6 @@ const SettingPage: ActivityComponentType = () => {
210224
);
211225
};
212226

213-
// Styled components...
214227
const S = {
215228
Container: styled.div`
216229
padding: 20px;
@@ -289,22 +302,19 @@ const SearchResults = styled.div<SearchResultsProps>`
289302

290303
const SearchResultItem = styled.button`
291304
width: 100%;
292-
padding: 12px 16px;
305+
padding: 12px 0;
293306
text-align: left;
294307
border: none;
295308
background: none;
296309
cursor: pointer;
297310
display: flex;
298311
align-items: center;
299312
border-bottom: 1px solid #e5e5e5;
313+
color: #000000;
300314
301315
&:last-child {
302316
border-bottom: none;
303317
}
304-
305-
&:hover {
306-
background-color: #f8f8f8;
307-
}
308318
`;
309319

310320
const StationContainer = styled.div`
@@ -319,7 +329,15 @@ const LabelOptions = styled.div`
319329
display: flex;
320330
gap: 8px;
321331
padding: 12px 16px;
322-
background-color: #f8f8f8;
332+
overflow-x: auto;
333+
white-space: nowrap;
334+
width: 100%;
335+
-ms-overflow-style: none;
336+
scrollbar-width: none;
337+
338+
&::-webkit-scrollbar {
339+
display: none;
340+
}
323341
`;
324342

325343
interface LabelButtonProps {
@@ -339,15 +357,12 @@ const LabelButton = styled.button<LabelButtonProps>`
339357
align-items: center;
340358
gap: 4px;
341359
transition: all 0.2s ease;
360+
flex-shrink: 0;
342361
343362
&:disabled {
344363
opacity: 0.5;
345364
cursor: not-allowed;
346365
}
347-
348-
&:hover:not(:disabled) {
349-
background-color: ${props => (props.$isActive ? '#00B534' : '#f8f8f8')};
350-
}
351366
`;
352367

353368
const LabelIndicator = styled.span`

0 commit comments

Comments
 (0)