Skip to content

Commit

Permalink
Merge pull request #229 from dnd-side-project/fix-228
Browse files Browse the repository at this point in the history
[# 228] 식물 물주기, 비료주기 추가 바텀 시트 오류 수정
  • Loading branch information
gihwan-dev authored Sep 23, 2024
2 parents 404fa16 + d65d09e commit 62ee7b3
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/LoadingSpinner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const LoadingSpinner = ({ transparent }: LoadingSpinnerProps) => {
return (
<Screen
className={cn(
'flex fixed top-0 right-0 z-50 w-screen overflow-hidden items-center justify-center h-screen p-0',
'flex fixed top-0 right-0 z-50 w-screen overflow-hidden items-center justify-center h-screen p-0 max-w-none',
transparent ? 'bg-black bg-opacity-25' : 'bg-white',
)}
>
Expand Down
2 changes: 1 addition & 1 deletion src/components/addPlant/NotificationToggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const NotificationToggle = ({
<CTAButton
onClick={() => {
onSelect?.(selected);
onClose();
setIsOpen(false);
}}
text={'선택하기'}
className={'bg-BloomingGreen500 text-white'}
Expand Down
3 changes: 3 additions & 0 deletions src/components/addPlant/NotificationToggleList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ const NotificationToggleList = ({
};

const handleBottomSheetClose = (type: 'water' | 'fertilizer') => {
console.log('type', type);
console.log('water', water.period);
console.log('fertilizer', fertilizer.period);
switch (type) {
case 'water':
if (!water.period) {
Expand Down
1 change: 1 addition & 0 deletions src/components/addPlant/PlantTypeTextField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const PlantTypeTextField = () => {
icon={<IconSearchMono />}
value={plantType ?? ''}
onMouseDown={onMouseDown}
readOnly={true}
/>
{open && (
<div className={'w-screen h-screen fixed top-0 left-0 bg-white z-50'}>
Expand Down
12 changes: 9 additions & 3 deletions src/components/common/CenterBottomSheet/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import { ReactNode } from 'react';
import { cn } from '@/utils.ts';
import { Dialog, DialogContent, DialogDescription, DialogFooter } from '@/components/ui/dialog.tsx';
import {
Dialog,
DialogContent,
DialogDescription,
DialogFooter,
DialogTitle,
} from '@/components/ui/dialog.tsx';

interface CenterBottomSheetProps {
title: string | ReactNode;
Expand All @@ -27,7 +33,7 @@ const CenterBottomSheet = ({
<div className="flex justify-center my-2.5">
<div className="w-12 h-1 bg-Gray100 rounded-full" />
</div>
<header
<DialogTitle
className={cn(
'text-start px-2.5 text-Gray800 whitespace-pre-wrap',
headerAsLabel
Expand All @@ -36,7 +42,7 @@ const CenterBottomSheet = ({
)}
>
{title}
</header>
</DialogTitle>
<DialogDescription>{content}</DialogDescription>
<DialogFooter
className={cn(
Expand Down

0 comments on commit 62ee7b3

Please sign in to comment.