Skip to content

Commit 1a23f4c

Browse files
committed
FEAT vaul drawer testing (#develop)
1 parent fca3eee commit 1a23f4c

File tree

8 files changed

+32
-16
lines changed

8 files changed

+32
-16
lines changed

services/ahhachul.com/src/components/common/filter/drawerFilter/DrawerFilter.component.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ const DrawerFilter: React.FC<DrawerFilterProps> = ({ label, drawerTitle }) => {
3232
</S.FilterButton>
3333
</Drawer.Trigger>
3434
<Drawer.Portal>
35-
<S.Overlay />
36-
<S.DrawerContent>
35+
<Drawer.Overlay css={S.overlay} />
36+
<Drawer.Content css={S.drawerContainer}>
3737
<S.ContentWrapper>
3838
<S.Header>
3939
<S.ActionButton variant="cancel" onClick={handleToggleDrawer}>
@@ -52,7 +52,7 @@ const DrawerFilter: React.FC<DrawerFilterProps> = ({ label, drawerTitle }) => {
5252
</S.SearchContainer>
5353
<S.ContentArea />
5454
</S.ContentWrapper>
55-
</S.DrawerContent>
55+
</Drawer.Content>
5656
</Drawer.Portal>
5757
</Drawer.Root>
5858
);

services/ahhachul.com/src/components/common/filter/drawerFilter/DrawerFilter.styled.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const FilterButton = styled.button<{ isActive: boolean }>`
2121
}
2222
`;
2323

24-
export const Overlay = styled(Drawer.Overlay)`
24+
export const overlay = css`
2525
position: fixed;
2626
top: 0;
2727
right: 0;
@@ -30,18 +30,17 @@ export const Overlay = styled(Drawer.Overlay)`
3030
background-color: rgba(0, 0, 0, 0.4);
3131
`;
3232

33-
export const DrawerContent = styled(Drawer.Content)`
34-
z-index: ${({ theme }) => theme.zIndex.drawer};
33+
export const drawerContainer = css`
34+
z-index: 999999999;
3535
display: flex;
3636
flex-direction: column;
3737
border-top-left-radius: 10px;
3838
border-top-right-radius: 10px;
39-
height: max-content;
39+
max-height: 96%;
4040
position: fixed;
4141
bottom: 0;
4242
left: 0;
4343
right: 0;
44-
box-shadow: 0px -10px 16px 0px rgba(0, 0, 0, 0.17);
4544
`;
4645

4746
export const ContentWrapper = styled.div`

services/ahhachul.com/src/components/common/float/atoms/floatBtn/FloatButton.component.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ import * as S from './FloatButton.styled';
44

55
interface FloatButtonProps {
66
onClick: () => void;
7+
className?: string;
78
}
89

9-
const FloatButton = ({ onClick, children }: PropsWithChildren<FloatButtonProps>) => {
10+
const FloatButton = ({ onClick, className, children }: PropsWithChildren<FloatButtonProps>) => {
1011
return (
11-
<S.FloatButton type="button" onClick={onClick}>
12+
<S.FloatButton type="button" className={className} onClick={onClick}>
1213
{children}
1314
</S.FloatButton>
1415
);

services/ahhachul.com/src/components/common/float/molecules/newBtn/newBtn.component.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ interface NewBtnProps {
1212
type?: NewBtnType;
1313
replace?: boolean;
1414
checkAuth?: boolean;
15+
className?: string;
1516
}
1617

1718
const NewBtn = ({
@@ -20,6 +21,7 @@ const NewBtn = ({
2021
type = 'new',
2122
replace = false,
2223
checkAuth = true,
24+
className,
2325
}: NewBtnProps) => {
2426
const { push, replace: replacePage } = useFlow();
2527
const { authService } = useAuth();
@@ -36,7 +38,7 @@ const NewBtn = ({
3638
};
3739

3840
return (
39-
<UiComponent.FloatButton onClick={onClick}>
41+
<UiComponent.FloatButton className={className} onClick={onClick}>
4042
{type === 'new' ? <PlusIcon /> : <ListIcon />}
4143
<span>{label}</span>
4244
</UiComponent.FloatButton>

services/ahhachul.com/src/components/common/maintain/MaintainContent.component.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import styled from '@emotion/styled';
22

33
import { useFlow } from '@/stackflow';
44

5-
const MaintainContent = () => {
5+
const MaintainContent = ({ actionLabel = '홈으로' }: { actionLabel?: string }) => {
66
const { pop } = useFlow();
77
const handleBack = () => pop();
88

@@ -34,7 +34,7 @@ const MaintainContent = () => {
3434
<Title>기능 준비 중입니다</Title>
3535
<Message>{'더 나은 서비스 제공을 위해\n해당 기능의 업데이트를 진행하고 있습니다.'}</Message>
3636
<ButtonGroup>
37-
<HomeButton onClick={handleBack}>홈으로</HomeButton>
37+
<HomeButton onClick={handleBack}>{actionLabel}</HomeButton>
3838
</ButtonGroup>
3939
</ContentWrapper>
4040
</Container>

services/ahhachul.com/src/components/domain/complaint/postDetail/sendMessage/SendMessage.component.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,5 +108,9 @@ export default function SendComplaintMessage({
108108

109109
if (!isAuthor) return null;
110110

111-
return <UiComponent.FloatButton onClick={handleClick}>즉시 민원 보내기</UiComponent.FloatButton>;
111+
return (
112+
<UiComponent.FloatButton css={{ bottom: '130px' }} onClick={handleClick}>
113+
즉시 민원 보내기
114+
</UiComponent.FloatButton>
115+
);
112116
}
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
import { LayoutComponent } from '@/components';
2+
import { MaintainContent } from '@/components/common';
23

34
const EditComplaintPage = () => {
4-
return <LayoutComponent.Base>EditComplaintPage</LayoutComponent.Base>;
5+
return (
6+
<LayoutComponent.Base>
7+
<MaintainContent actionLabel="뒤로 가기" />
8+
</LayoutComponent.Base>
9+
);
510
};
611

712
export default EditComplaintPage;
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
import { LayoutComponent } from '@/components';
2+
import { MaintainContent } from '@/components/common';
23

34
const SubwayMapPage = () => {
4-
return <LayoutComponent.Base>지하철 노선도</LayoutComponent.Base>;
5+
return (
6+
<LayoutComponent.Base>
7+
<MaintainContent />
8+
</LayoutComponent.Base>
9+
);
510
};
611

712
export default SubwayMapPage;

0 commit comments

Comments
 (0)