@1d1s/design-system 2.7.0 → 2.8.0
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/dist/components/Icons/ArrowLeft.d.ts +2 -0
- package/dist/components/Icons/index.d.ts +1 -0
- package/dist/components/MobileHeader/MobileHeader.d.ts +30 -0
- package/dist/components/MobileHeader/index.d.ts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.es.js +292 -287
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface MobileHeaderProps extends Omit<React.HTMLAttributes<HTMLElement>, "title"> {
|
|
3
|
+
/** 가운데 타이틀 — body1 / extrabold 로 통일 렌더 */
|
|
4
|
+
title: string;
|
|
5
|
+
/** 뒤로가기 핸들러. 넘기지 않으면 좌측 버튼은 렌더되지 않음 */
|
|
6
|
+
onBack?: () => void;
|
|
7
|
+
/** 타이틀 아래 작은 보조 텍스트 */
|
|
8
|
+
subtitle?: React.ReactNode;
|
|
9
|
+
/** 우측 액션 슬롯 (설정 / 공유 등) */
|
|
10
|
+
right?: React.ReactNode;
|
|
11
|
+
/** 뒤로가기 버튼 aria-label (기본 "뒤로가기") */
|
|
12
|
+
backLabel?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* MobileHeader
|
|
16
|
+
* 모바일 서브페이지용 sticky 헤더 — 좌측 뒤로가기 / 가운데 타이틀 / 우측 액션 슬롯.
|
|
17
|
+
* `lg:hidden` 으로 모바일 전용이며, 데스크톱/태블릿은 {@link TopNav} 를 사용한다.
|
|
18
|
+
*
|
|
19
|
+
* 타이틀 규격은 body1(text-xl) · extrabold 로 통일한다.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```tsx
|
|
23
|
+
* <MobileHeader
|
|
24
|
+
* title="챌린지 상세"
|
|
25
|
+
* onBack={() => router.back()}
|
|
26
|
+
* right={<button aria-label="설정"><Settings width={20} height={20} /></button>}
|
|
27
|
+
* />
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare function MobileHeader({ title, onBack, subtitle, right, backLabel, className, ...props }: MobileHeaderProps): React.ReactElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MobileHeader';
|
|
@@ -24,6 +24,7 @@ export { Icon } from './Icons/Icon';
|
|
|
24
24
|
export type { IconName, IconProps } from './Icons/Icon';
|
|
25
25
|
export * from './ImagePicker';
|
|
26
26
|
export * from './ImagePlaceholder';
|
|
27
|
+
export * from './MobileHeader';
|
|
27
28
|
export * from './PageWatermark';
|
|
28
29
|
export * from './Pagination';
|
|
29
30
|
export * from './ProgressBar';
|