Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

Commit f34f3a2

Browse files
authored
시간 변경 모달 스타일 변경 (#62)
1 parent 939f72b commit f34f3a2

File tree

2 files changed

+26
-11
lines changed

2 files changed

+26
-11
lines changed

src/renderer/features/time/ui/chage-time-dialog.tsx

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,17 @@ export const ChangeTimeDialog = ({
8080
}, [open, categoryTimeMinutes, categoryTimeSeconds]);
8181

8282
return (
83-
<Dialog open={open} onOpenChange={onOpenChange} fullScreen={false} animated={false}>
84-
<div className="flex h-full flex-col">
85-
<div className="flex flex-1 flex-col items-center justify-center gap-8">
86-
<div className="flex items-center justify-center gap-2 px-4 py-2">
83+
<Dialog
84+
open={open}
85+
onOpenChange={onOpenChange}
86+
fullScreen={false}
87+
animated={false}
88+
contentClassname="w-[335px]"
89+
>
90+
<div className="flex h-full flex-col gap-1">
91+
<div className="h-[40px]" />
92+
<div className="flex flex-col">
93+
<div className="mb-3 inline-flex items-center justify-center gap-2 px-4 py-2">
8794
<Icon name={getCategoryIconName(category)} size="sm" />
8895
<span className="body-sb text-text-secondary">{category}</span>
8996
</div>
@@ -99,9 +106,9 @@ export const ChangeTimeDialog = ({
99106
<Icon name="minus" size="md" />
100107
</Button>
101108

102-
<div className="flex items-center justify-center gap-3 rounded-md bg-background-secondary px-4 py-5">
109+
<div className="flex items-center justify-center gap-3 rounded-md bg-background-secondary p-5">
103110
<Icon name={mode === 'focus' ? 'focusTime' : 'restTime'} size="md" />
104-
<div className="header-1 flex items-center justify-center gap-0.5 tabular-nums text-text-primary">
111+
<div className="header-2 flex items-center justify-center gap-0.5 tabular-nums text-text-primary">
105112
<span>{padNumber(minutes)}</span>
106113
{/* @note: 콜론 가운데 정렬이 되지 않아 이렇게 표시함 */}
107114
<span className="mt-[-8px]">:</span>
@@ -125,12 +132,17 @@ export const ChangeTimeDialog = ({
125132
</div>
126133
</div>
127134
</div>
128-
</div>
129135

130-
<div className="w-full pb-6 pt-16 text-center">
131-
<Button variant="secondary" size="icon" className="aspect-square p-7" onClick={applyTime}>
132-
<Icon name="check" size="lg" />
133-
</Button>
136+
<div className="mt-11 w-full pb-3 text-center">
137+
<Button
138+
variant="secondary"
139+
size="icon"
140+
className="aspect-square p-7"
141+
onClick={applyTime}
142+
>
143+
<Icon name="check" size="lg" />
144+
</Button>
145+
</div>
134146
</div>
135147
</div>
136148
</Dialog>

src/renderer/shared/ui/dialog.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export type DialogProps = {
1111
title?: string;
1212
hasCloseButton?: boolean;
1313
fullScreen?: boolean;
14+
contentClassname?: string;
1415
animated?: boolean;
1516
children: React.ReactNode;
1617
onOpenChange?: (open: boolean) => void;
@@ -22,6 +23,7 @@ export const Dialog = ({
2223
hasCloseButton = true,
2324
fullScreen = false,
2425
animated = true,
26+
contentClassname,
2527
children,
2628
onOpenChange,
2729
}: DialogProps) => {
@@ -42,6 +44,7 @@ export const Dialog = ({
4244
!fullScreen &&
4345
'fixed left-[50%] top-[50%] translate-x-[-50%] translate-y-[-50%] rounded-md p-[20px] shadow-lg',
4446
'z-50 w-[95%] max-w-md bg-background-primary',
47+
contentClassname,
4548

4649
animated &&
4750
'duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]',

0 commit comments

Comments
 (0)