@daeryun/dr_components 0.5.49 → 0.5.50
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/Header/MobileHeader.d.ts +2 -1
- package/dist/components/Header/MobileHeader.jsx +10 -5
- package/dist/components/Header/MobileHeader.tsx +27 -15
- package/dist/components/Header/PcHeader.d.ts +2 -1
- package/dist/components/Header/PcHeader.jsx +35 -30
- package/dist/components/Header/PcHeader.tsx +84 -68
- package/dist/components/PageTitleBox/ImgTypes.d.ts +10 -0
- package/dist/components/PageTitleBox/ImgTypes.js +10 -0
- package/dist/components/PageTitleBox/ImgTypes.ts +10 -0
- package/dist/components/PageTitleBox/PageTitleBox.d.ts +1 -10
- package/dist/components/PageTitleBox/PageTitleBox.jsx +1 -10
- package/dist/components/PageTitleBox/PageTitleBox.stories.jsx +2 -1
- package/dist/components/PageTitleBox/PageTitleBox.stories.tsx +2 -1
- package/dist/components/PageTitleBox/PageTitleBox.tsx +1 -11
- package/dist/components/index.js +1 -0
- package/dist/components/index.ts +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare const MobileHeader: ({ isMain, isTop, handleMenuToggle, centerName }: {
|
|
2
|
+
declare const MobileHeader: ({ isMain, isNotSubPage, isTop, handleMenuToggle, centerName }: {
|
|
3
3
|
isMain: boolean;
|
|
4
|
+
isNotSubPage?: boolean;
|
|
4
5
|
isTop: boolean;
|
|
5
6
|
handleMenuToggle: (url?: string | undefined) => void;
|
|
6
7
|
centerName: string;
|
|
@@ -17,7 +17,7 @@ import SearchWhite from '../../asset/images/header/search_white.webp';
|
|
|
17
17
|
import SearchBlack from '../../asset/images/header/search_black.webp';
|
|
18
18
|
import MenuWhite from '../../asset/images/header/h_menu.webp';
|
|
19
19
|
import MenuBlack from '../../asset/images/header/h_menu_b.webp';
|
|
20
|
-
const MobileHeader = ({ isMain, isTop, handleMenuToggle, centerName }) => {
|
|
20
|
+
const MobileHeader = ({ isMain, isNotSubPage, isTop, handleMenuToggle, centerName }) => {
|
|
21
21
|
const router = useRouter();
|
|
22
22
|
return (<header className={'relative h-[70px] w-full transition-colors duration-300 sm:hidden ' +
|
|
23
23
|
`${isMain && isTop ? '' : 'bg-white shadow-sm '}` +
|
|
@@ -31,15 +31,20 @@ const MobileHeader = ({ isMain, isTop, handleMenuToggle, centerName }) => {
|
|
|
31
31
|
<span className={'flex items-center justify-end gap-[15px] '}>
|
|
32
32
|
{/*통합 검색*/}
|
|
33
33
|
<button onClick={() => __awaiter(void 0, void 0, void 0, function* () {
|
|
34
|
-
|
|
34
|
+
if (isNotSubPage) {
|
|
35
|
+
yield router.push('https://www.daeryunlaw.com/integrate?tab=%EC%A0%84%EC%B2%B4&search=');
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
yield router.push('/integrate?search=&tab=전체');
|
|
39
|
+
}
|
|
35
40
|
})} className={'relative flex aspect-square w-[24px] shrink-0 '}>
|
|
36
41
|
<Image src={isTop && isMain ? SearchWhite : SearchBlack} alt={'통합검색 이동'} width={24} height={24} className={'h-full w-full scale-90 object-contain'}/>
|
|
37
42
|
</button>
|
|
38
43
|
|
|
39
44
|
{/*메뉴 버튼*/}
|
|
40
|
-
<button tabIndex={0} onClick={() => handleMenuToggle()} className={'relative flex aspect-square w-[24px] shrink-0 '}>
|
|
41
|
-
|
|
42
|
-
|
|
45
|
+
{isNotSubPage ? (<></>) : (<button tabIndex={0} onClick={() => handleMenuToggle()} className={'relative flex aspect-square w-[24px] shrink-0 '}>
|
|
46
|
+
<Image id={'menu'} src={isTop && isMain ? MenuWhite : MenuBlack} alt="전체메뉴 열기" width={38} height={20} className={'h-full w-full object-contain'}/>
|
|
47
|
+
</button>)}
|
|
43
48
|
</span>
|
|
44
49
|
</HeaderWrapper>
|
|
45
50
|
</header>);
|
|
@@ -13,11 +13,13 @@ import MenuBlack from '../../asset/images/header/h_menu_b.webp';
|
|
|
13
13
|
|
|
14
14
|
const MobileHeader = ({
|
|
15
15
|
isMain,
|
|
16
|
+
isNotSubPage,
|
|
16
17
|
isTop,
|
|
17
18
|
handleMenuToggle,
|
|
18
19
|
centerName
|
|
19
20
|
}: {
|
|
20
21
|
isMain: boolean;
|
|
22
|
+
isNotSubPage?: boolean;
|
|
21
23
|
isTop: boolean;
|
|
22
24
|
handleMenuToggle: (url?: string | undefined) => void;
|
|
23
25
|
centerName: string;
|
|
@@ -49,7 +51,13 @@ const MobileHeader = ({
|
|
|
49
51
|
{/*통합 검색*/}
|
|
50
52
|
<button
|
|
51
53
|
onClick={async () => {
|
|
52
|
-
|
|
54
|
+
if (isNotSubPage) {
|
|
55
|
+
await router.push(
|
|
56
|
+
'https://www.daeryunlaw.com/integrate?tab=%EC%A0%84%EC%B2%B4&search='
|
|
57
|
+
);
|
|
58
|
+
} else {
|
|
59
|
+
await router.push('/integrate?search=&tab=전체');
|
|
60
|
+
}
|
|
53
61
|
}}
|
|
54
62
|
className={'relative flex aspect-square w-[24px] shrink-0 '}
|
|
55
63
|
>
|
|
@@ -63,20 +71,24 @@ const MobileHeader = ({
|
|
|
63
71
|
</button>
|
|
64
72
|
|
|
65
73
|
{/*메뉴 버튼*/}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
74
|
+
{isNotSubPage ? (
|
|
75
|
+
<></>
|
|
76
|
+
) : (
|
|
77
|
+
<button
|
|
78
|
+
tabIndex={0}
|
|
79
|
+
onClick={() => handleMenuToggle()}
|
|
80
|
+
className={'relative flex aspect-square w-[24px] shrink-0 '}
|
|
81
|
+
>
|
|
82
|
+
<Image
|
|
83
|
+
id={'menu'}
|
|
84
|
+
src={isTop && isMain ? MenuWhite : MenuBlack}
|
|
85
|
+
alt="전체메뉴 열기"
|
|
86
|
+
width={38}
|
|
87
|
+
height={20}
|
|
88
|
+
className={'h-full w-full object-contain'}
|
|
89
|
+
/>
|
|
90
|
+
</button>
|
|
91
|
+
)}
|
|
80
92
|
</span>
|
|
81
93
|
</HeaderWrapper>
|
|
82
94
|
</header>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IRoute } from '../common';
|
|
2
|
-
declare const PcHeader: ({ pcRoutes, isMain, isTop, menuToggle, handleMenuToggle, centerName }: {
|
|
2
|
+
declare const PcHeader: ({ isNotSubPage, pcRoutes, isMain, isTop, menuToggle, handleMenuToggle, centerName }: {
|
|
3
|
+
isNotSubPage?: boolean;
|
|
3
4
|
pcRoutes: IRoute[];
|
|
4
5
|
isMain: boolean;
|
|
5
6
|
isTop: boolean;
|
|
@@ -18,7 +18,7 @@ import SearchBlack from '../../asset/images/header/search_black.webp';
|
|
|
18
18
|
import MenuWhite from '../../asset/images/header/h_menu.webp';
|
|
19
19
|
import MenuBlack from '../../asset/images/header/h_menu_b.webp';
|
|
20
20
|
import IconNewLink from '../../asset/images/header/head_link.svg';
|
|
21
|
-
const PcHeader = ({ pcRoutes, isMain, isTop, menuToggle, handleMenuToggle, centerName }) => {
|
|
21
|
+
const PcHeader = ({ isNotSubPage, pcRoutes, isMain, isTop, menuToggle, handleMenuToggle, centerName }) => {
|
|
22
22
|
const router = useRouter();
|
|
23
23
|
const pathname = usePathname();
|
|
24
24
|
const [isHover, setIsHover] = useState(false);
|
|
@@ -64,35 +64,40 @@ const PcHeader = ({ pcRoutes, isMain, isTop, menuToggle, handleMenuToggle, cente
|
|
|
64
64
|
<span className={'flex flex-1 items-start justify-end gap-[20px] pt-[5px] ' +
|
|
65
65
|
//1024px
|
|
66
66
|
'max-lg:pt-0'}>
|
|
67
|
-
{
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
'max-3xl:mr-[20px] max-3xl:max-w-[800px] max-3xl:gap-[20px] ' +
|
|
71
|
-
//1280px
|
|
72
|
-
'max-xl:mr-[10px] max-xl:min-w-[500px] max-xl:max-w-[600px] max-xl:gap-[10px] max-xl:pt-[7px] ' +
|
|
73
|
-
//1024px
|
|
74
|
-
'max-lg:hidden '} style={{ gridTemplateColumns: `repeat(${pcRoutes.length}, minmax(0, 1fr))` }}>
|
|
75
|
-
{pcRoutes.map(pcRoute => (<span key={'route_' + pcRoute.name} className={'flex flex-1 flex-col items-center gap-[15px] pb-[35px]'}>
|
|
76
|
-
<Link href={pcRoute.path} className={`${isMain || isHover || menuToggle ? 'text-white ' : ''}` +
|
|
77
|
-
'mb-[20px] text-[20px] font-[800] leading-none tracking-[-0.7px] ' +
|
|
67
|
+
{isNotSubPage ? (<></>) : (<span className={'gr mr-[70px] grid min-w-[750px] max-w-[850px] gap-[30px] pt-[5px] ' +
|
|
68
|
+
//1500px
|
|
69
|
+
'max-3xl:mr-[20px] max-3xl:max-w-[800px] max-3xl:gap-[20px] ' +
|
|
78
70
|
//1280px
|
|
79
|
-
'max-xl:
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
71
|
+
'max-xl:mr-[10px] max-xl:min-w-[500px] max-xl:max-w-[600px] max-xl:gap-[10px] max-xl:pt-[7px] ' +
|
|
72
|
+
//1024px
|
|
73
|
+
'max-lg:hidden '} style={{ gridTemplateColumns: `repeat(${pcRoutes.length}, minmax(0, 1fr))` }}>
|
|
74
|
+
{pcRoutes.map(pcRoute => (<span key={'route_' + pcRoute.name} className={'flex flex-1 flex-col items-center gap-[15px] pb-[35px]'}>
|
|
75
|
+
<Link href={pcRoute.path} className={`${isMain || isHover || menuToggle ? 'text-white ' : ''}` +
|
|
76
|
+
'mb-[20px] text-[20px] font-[800] leading-none tracking-[-0.7px] ' +
|
|
85
77
|
//1280px
|
|
86
|
-
'max-xl:text-[
|
|
87
|
-
{
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
78
|
+
'max-xl:text-[18px] '}>
|
|
79
|
+
{pcRoute.name}
|
|
80
|
+
</Link>
|
|
81
|
+
{pcRoute.routes.map(inRoute => (<Link key={'in_route_' + inRoute.name} href={inRoute.path} target={inRoute.newTab ? '_blank' : ''} className={'break-keep text-center text-[16px] font-[500] leading-[1.2] tracking-[-0.6px] text-[#C4C4C4] transition-opacity ' +
|
|
82
|
+
'hover:text-white ' +
|
|
83
|
+
`${isHover ? '' : 'opacity-0 '}` +
|
|
84
|
+
//1280px
|
|
85
|
+
'max-xl:text-[14px] '}>
|
|
86
|
+
{inRoute.name}
|
|
87
|
+
{inRoute.newTab ? (<IconNewLink stroke={'#fff'} className={'mb-1 ml-1 inline aspect-square w-[12px]'}/>) : (<></>)}
|
|
88
|
+
</Link>))}
|
|
89
|
+
</span>))}
|
|
90
|
+
</span>)}
|
|
91
|
+
{/*nav*/}
|
|
92
92
|
|
|
93
93
|
{/*통합 검색*/}
|
|
94
94
|
<button onClick={() => __awaiter(void 0, void 0, void 0, function* () {
|
|
95
|
-
|
|
95
|
+
if (isNotSubPage) {
|
|
96
|
+
yield router.push('https://www.daeryunlaw.com/integrate?tab=%EC%A0%84%EC%B2%B4&search=');
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
yield router.push('/integrate?search=&tab=전체');
|
|
100
|
+
}
|
|
96
101
|
})} className={'relative flex aspect-square w-[27px] shrink-0 ' +
|
|
97
102
|
//1280px
|
|
98
103
|
'max-xl:w-[25px] '}>
|
|
@@ -100,11 +105,11 @@ const PcHeader = ({ pcRoutes, isMain, isTop, menuToggle, handleMenuToggle, cente
|
|
|
100
105
|
</button>
|
|
101
106
|
|
|
102
107
|
{/*메뉴 버튼*/}
|
|
103
|
-
<button tabIndex={0} onClick={() => handleMenuToggle()} className={'relative flex aspect-square w-[27px] shrink-0 ' +
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
+
{isNotSubPage ? (<></>) : (<button tabIndex={0} onClick={() => handleMenuToggle()} className={'relative flex aspect-square w-[27px] shrink-0 ' +
|
|
109
|
+
//1280px
|
|
110
|
+
'max-xl:w-[25px] '}>
|
|
111
|
+
<Image id={'menu'} src={isMain || isHover || menuToggle ? MenuWhite : MenuBlack} alt="전체메뉴 열기" width={38} height={20} className={'h-full w-full object-contain'}/>
|
|
112
|
+
</button>)}
|
|
108
113
|
</span>
|
|
109
114
|
</HeaderWrapper>
|
|
110
115
|
</header>);
|
|
@@ -14,6 +14,7 @@ import MenuBlack from '../../asset/images/header/h_menu_b.webp';
|
|
|
14
14
|
import IconNewLink from '../../asset/images/header/head_link.svg';
|
|
15
15
|
|
|
16
16
|
const PcHeader = ({
|
|
17
|
+
isNotSubPage,
|
|
17
18
|
pcRoutes,
|
|
18
19
|
isMain,
|
|
19
20
|
isTop,
|
|
@@ -21,6 +22,7 @@ const PcHeader = ({
|
|
|
21
22
|
handleMenuToggle,
|
|
22
23
|
centerName
|
|
23
24
|
}: {
|
|
25
|
+
isNotSubPage?: boolean;
|
|
24
26
|
pcRoutes: IRoute[];
|
|
25
27
|
isMain: boolean;
|
|
26
28
|
isTop: boolean;
|
|
@@ -107,67 +109,77 @@ const PcHeader = ({
|
|
|
107
109
|
'max-lg:pt-0'
|
|
108
110
|
}
|
|
109
111
|
>
|
|
110
|
-
{
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
href={pcRoute.path}
|
|
130
|
-
className={
|
|
131
|
-
`${isMain || isHover || menuToggle ? 'text-white ' : ''}` +
|
|
132
|
-
'mb-[20px] text-[20px] font-[800] leading-none tracking-[-0.7px] ' +
|
|
133
|
-
//1280px
|
|
134
|
-
'max-xl:text-[18px] '
|
|
135
|
-
}
|
|
112
|
+
{isNotSubPage ? (
|
|
113
|
+
<></>
|
|
114
|
+
) : (
|
|
115
|
+
<span
|
|
116
|
+
className={
|
|
117
|
+
'gr mr-[70px] grid min-w-[750px] max-w-[850px] gap-[30px] pt-[5px] ' +
|
|
118
|
+
//1500px
|
|
119
|
+
'max-3xl:mr-[20px] max-3xl:max-w-[800px] max-3xl:gap-[20px] ' +
|
|
120
|
+
//1280px
|
|
121
|
+
'max-xl:mr-[10px] max-xl:min-w-[500px] max-xl:max-w-[600px] max-xl:gap-[10px] max-xl:pt-[7px] ' +
|
|
122
|
+
//1024px
|
|
123
|
+
'max-lg:hidden '
|
|
124
|
+
}
|
|
125
|
+
style={{ gridTemplateColumns: `repeat(${pcRoutes.length}, minmax(0, 1fr))` }}
|
|
126
|
+
>
|
|
127
|
+
{pcRoutes.map(pcRoute => (
|
|
128
|
+
<span
|
|
129
|
+
key={'route_' + pcRoute.name}
|
|
130
|
+
className={'flex flex-1 flex-col items-center gap-[15px] pb-[35px]'}
|
|
136
131
|
>
|
|
137
|
-
{pcRoute.name}
|
|
138
|
-
</Link>
|
|
139
|
-
{pcRoute.routes.map(inRoute => (
|
|
140
132
|
<Link
|
|
141
|
-
|
|
142
|
-
href={inRoute.path}
|
|
143
|
-
target={inRoute.newTab ? '_blank' : ''}
|
|
133
|
+
href={pcRoute.path}
|
|
144
134
|
className={
|
|
145
|
-
|
|
146
|
-
'
|
|
147
|
-
`${isHover ? '' : 'opacity-0 '}` +
|
|
135
|
+
`${isMain || isHover || menuToggle ? 'text-white ' : ''}` +
|
|
136
|
+
'mb-[20px] text-[20px] font-[800] leading-none tracking-[-0.7px] ' +
|
|
148
137
|
//1280px
|
|
149
|
-
'max-xl:text-[
|
|
138
|
+
'max-xl:text-[18px] '
|
|
150
139
|
}
|
|
151
140
|
>
|
|
152
|
-
{
|
|
153
|
-
{inRoute.newTab ? (
|
|
154
|
-
<IconNewLink
|
|
155
|
-
stroke={'#fff'}
|
|
156
|
-
className={'mb-1 ml-1 inline aspect-square w-[12px]'}
|
|
157
|
-
/>
|
|
158
|
-
) : (
|
|
159
|
-
<></>
|
|
160
|
-
)}
|
|
141
|
+
{pcRoute.name}
|
|
161
142
|
</Link>
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
143
|
+
{pcRoute.routes.map(inRoute => (
|
|
144
|
+
<Link
|
|
145
|
+
key={'in_route_' + inRoute.name}
|
|
146
|
+
href={inRoute.path}
|
|
147
|
+
target={inRoute.newTab ? '_blank' : ''}
|
|
148
|
+
className={
|
|
149
|
+
'break-keep text-center text-[16px] font-[500] leading-[1.2] tracking-[-0.6px] text-[#C4C4C4] transition-opacity ' +
|
|
150
|
+
'hover:text-white ' +
|
|
151
|
+
`${isHover ? '' : 'opacity-0 '}` +
|
|
152
|
+
//1280px
|
|
153
|
+
'max-xl:text-[14px] '
|
|
154
|
+
}
|
|
155
|
+
>
|
|
156
|
+
{inRoute.name}
|
|
157
|
+
{inRoute.newTab ? (
|
|
158
|
+
<IconNewLink
|
|
159
|
+
stroke={'#fff'}
|
|
160
|
+
className={'mb-1 ml-1 inline aspect-square w-[12px]'}
|
|
161
|
+
/>
|
|
162
|
+
) : (
|
|
163
|
+
<></>
|
|
164
|
+
)}
|
|
165
|
+
</Link>
|
|
166
|
+
))}
|
|
167
|
+
</span>
|
|
168
|
+
))}
|
|
169
|
+
</span>
|
|
170
|
+
)}
|
|
171
|
+
{/*nav*/}
|
|
166
172
|
|
|
167
173
|
{/*통합 검색*/}
|
|
168
174
|
<button
|
|
169
175
|
onClick={async () => {
|
|
170
|
-
|
|
176
|
+
if (isNotSubPage) {
|
|
177
|
+
await router.push(
|
|
178
|
+
'https://www.daeryunlaw.com/integrate?tab=%EC%A0%84%EC%B2%B4&search='
|
|
179
|
+
);
|
|
180
|
+
} else {
|
|
181
|
+
await router.push('/integrate?search=&tab=전체');
|
|
182
|
+
}
|
|
171
183
|
}}
|
|
172
184
|
className={
|
|
173
185
|
'relative flex aspect-square w-[27px] shrink-0 ' +
|
|
@@ -185,24 +197,28 @@ const PcHeader = ({
|
|
|
185
197
|
</button>
|
|
186
198
|
|
|
187
199
|
{/*메뉴 버튼*/}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
200
|
+
{isNotSubPage ? (
|
|
201
|
+
<></>
|
|
202
|
+
) : (
|
|
203
|
+
<button
|
|
204
|
+
tabIndex={0}
|
|
205
|
+
onClick={() => handleMenuToggle()}
|
|
206
|
+
className={
|
|
207
|
+
'relative flex aspect-square w-[27px] shrink-0 ' +
|
|
208
|
+
//1280px
|
|
209
|
+
'max-xl:w-[25px] '
|
|
210
|
+
}
|
|
211
|
+
>
|
|
212
|
+
<Image
|
|
213
|
+
id={'menu'}
|
|
214
|
+
src={isMain || isHover || menuToggle ? MenuWhite : MenuBlack}
|
|
215
|
+
alt="전체메뉴 열기"
|
|
216
|
+
width={38}
|
|
217
|
+
height={20}
|
|
218
|
+
className={'h-full w-full object-contain'}
|
|
219
|
+
/>
|
|
220
|
+
</button>
|
|
221
|
+
)}
|
|
206
222
|
</span>
|
|
207
223
|
</HeaderWrapper>
|
|
208
224
|
</header>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const ImgTypes: {
|
|
2
|
+
readonly ARCHIVE: "archive";
|
|
3
|
+
readonly BROADCAST: "broadcast";
|
|
4
|
+
readonly FIELD: "field";
|
|
5
|
+
readonly INFO: "info";
|
|
6
|
+
readonly NOTICE: "notice";
|
|
7
|
+
readonly REPLY: "reply";
|
|
8
|
+
readonly SUCCESS: "success";
|
|
9
|
+
readonly TREND: "trend";
|
|
10
|
+
};
|
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
readonly ARCHIVE: "archive";
|
|
4
|
-
readonly BROADCAST: "broadcast";
|
|
5
|
-
readonly FIELD: "field";
|
|
6
|
-
readonly INFO: "info";
|
|
7
|
-
readonly NOTICE: "notice";
|
|
8
|
-
readonly REPLY: "reply";
|
|
9
|
-
readonly SUCCESS: "success";
|
|
10
|
-
readonly TREND: "trend";
|
|
11
|
-
};
|
|
2
|
+
import { ImgTypes } from './ImgTypes';
|
|
12
3
|
export type ImgType = (typeof ImgTypes)[keyof typeof ImgTypes];
|
|
13
4
|
interface PageTitleBoxProps {
|
|
14
5
|
titleTxt: React.ReactNode;
|
|
@@ -12,16 +12,7 @@ import noticeImg from '../../asset/images/PageTitleBox/notice.webp';
|
|
|
12
12
|
import replyImg from '../../asset/images/PageTitleBox/reply.webp';
|
|
13
13
|
import successImg from '../../asset/images/PageTitleBox/success.webp';
|
|
14
14
|
import trendImg from '../../asset/images/PageTitleBox/trend.webp';
|
|
15
|
-
|
|
16
|
-
ARCHIVE: 'archive',
|
|
17
|
-
BROADCAST: 'broadcast',
|
|
18
|
-
FIELD: 'field',
|
|
19
|
-
INFO: 'info',
|
|
20
|
-
NOTICE: 'notice',
|
|
21
|
-
REPLY: 'reply',
|
|
22
|
-
SUCCESS: 'success',
|
|
23
|
-
TREND: 'trend'
|
|
24
|
-
};
|
|
15
|
+
import { ImgTypes } from './ImgTypes';
|
|
25
16
|
const imageMap = {
|
|
26
17
|
[ImgTypes.ARCHIVE]: archiveImg,
|
|
27
18
|
[ImgTypes.BROADCAST]: broadcastImg,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import PageTitleBox
|
|
2
|
+
import PageTitleBox from './PageTitleBox';
|
|
3
|
+
import { ImgTypes } from './ImgTypes';
|
|
3
4
|
|
|
4
5
|
const meta: Meta<typeof PageTitleBox> = {
|
|
5
6
|
component: PageTitleBox,
|
|
@@ -14,17 +14,7 @@ import noticeImg from '../../asset/images/PageTitleBox/notice.webp';
|
|
|
14
14
|
import replyImg from '../../asset/images/PageTitleBox/reply.webp';
|
|
15
15
|
import successImg from '../../asset/images/PageTitleBox/success.webp';
|
|
16
16
|
import trendImg from '../../asset/images/PageTitleBox/trend.webp';
|
|
17
|
-
|
|
18
|
-
export const ImgTypes = {
|
|
19
|
-
ARCHIVE: 'archive',
|
|
20
|
-
BROADCAST: 'broadcast',
|
|
21
|
-
FIELD: 'field',
|
|
22
|
-
INFO: 'info',
|
|
23
|
-
NOTICE: 'notice',
|
|
24
|
-
REPLY: 'reply',
|
|
25
|
-
SUCCESS: 'success',
|
|
26
|
-
TREND: 'trend'
|
|
27
|
-
} as const;
|
|
17
|
+
import { ImgTypes } from './ImgTypes';
|
|
28
18
|
|
|
29
19
|
export type ImgType = (typeof ImgTypes)[keyof typeof ImgTypes];
|
|
30
20
|
|
package/dist/components/index.js
CHANGED
|
@@ -28,3 +28,4 @@ export { default as MobileHeader } from './Header/MobileHeader';
|
|
|
28
28
|
export { default as LawyerDetail } from './page/LawyerDetail/LawyerDetail';
|
|
29
29
|
export { default as System } from './page/System/SystemPage';
|
|
30
30
|
export { default as PageTitleBox } from './PageTitleBox/PageTitleBox';
|
|
31
|
+
export { ImgTypes } from './PageTitleBox/ImgTypes';
|
package/dist/components/index.ts
CHANGED
|
@@ -31,4 +31,4 @@ export { default as MobileHeader } from './Header/MobileHeader';
|
|
|
31
31
|
export { default as LawyerDetail } from './page/LawyerDetail/LawyerDetail';
|
|
32
32
|
export { default as System } from './page/System/SystemPage';
|
|
33
33
|
export { default as PageTitleBox } from './PageTitleBox/PageTitleBox';
|
|
34
|
-
export
|
|
34
|
+
export { ImgTypes } from './PageTitleBox/ImgTypes';
|