@uniai-fe/uds-templates 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
1
3
|
import clsx from "clsx";
|
|
2
4
|
import { PageFrameContainer } from "../container";
|
|
5
|
+
import { PageFrameNavigation } from "../navigation";
|
|
3
6
|
import type { PageFrameMobileProps } from "./types";
|
|
7
|
+
import React, { useCallback } from "react";
|
|
4
8
|
|
|
5
9
|
/**
|
|
6
10
|
* 모바일 전용 Page Frame 래퍼; 공통 컨테이너 위에 모바일 클래스/스타일을 덧입힌다.
|
|
@@ -14,8 +18,16 @@ export function PageFrameMobile({
|
|
|
14
18
|
bodyClassName,
|
|
15
19
|
footer,
|
|
16
20
|
footerClassName,
|
|
21
|
+
navigationProps,
|
|
17
22
|
...rest
|
|
18
23
|
}: PageFrameMobileProps) {
|
|
24
|
+
const Footer = useCallback(
|
|
25
|
+
(): React.ReactNode =>
|
|
26
|
+
footer ??
|
|
27
|
+
(navigationProps ? <PageFrameNavigation {...navigationProps} /> : null),
|
|
28
|
+
[footer, navigationProps],
|
|
29
|
+
);
|
|
30
|
+
|
|
19
31
|
return (
|
|
20
32
|
<PageFrameContainer
|
|
21
33
|
{...rest}
|
|
@@ -23,7 +35,7 @@ export function PageFrameMobile({
|
|
|
23
35
|
header={header}
|
|
24
36
|
headerClassName={clsx("page-frame-mobile-header", headerClassName)}
|
|
25
37
|
bodyClassName={clsx("page-frame-mobile-body", bodyClassName)}
|
|
26
|
-
footer={
|
|
38
|
+
footer={<Footer />}
|
|
27
39
|
footerClassName={clsx("page-frame-mobile-footer", footerClassName)}
|
|
28
40
|
/>
|
|
29
41
|
);
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import type { PageFrameContainerProps } from "../container";
|
|
2
|
+
import type { PageFrameNavigationProps } from "../navigation";
|
|
2
3
|
|
|
3
|
-
export
|
|
4
|
+
export interface PageFrameMobileProps extends PageFrameContainerProps {
|
|
5
|
+
navigationProps?: PageFrameNavigationProps;
|
|
6
|
+
}
|