@daeryun/dr_components 0.8.43 → 0.8.44
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/BrochureBtn/BrochureBtn.jsx +22 -6
- package/dist/components/BrochureBtn/BrochureBtn.stories.jsx +1 -1
- package/dist/components/BrochureBtn/BrochureBtn.stories.tsx +1 -1
- package/dist/components/BrochureBtn/BrochureBtn.tsx +22 -6
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -3,12 +3,28 @@ import Link from 'next/link';
|
|
|
3
3
|
import Image from 'next/image';
|
|
4
4
|
import btnImg from '../../asset/images/BrochureBtn/download_btn.webp';
|
|
5
5
|
const BrochureBtn = (props) => {
|
|
6
|
+
var _a, _b;
|
|
6
7
|
const { rounded = true, width = '100%', height = '100%', className = '', type = 'comp' } = props;
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
const brochureMap = {
|
|
9
|
+
comp: {
|
|
10
|
+
text: '기업법무 브로슈어',
|
|
11
|
+
link: 'https://d1tgonli21s4df.cloudfront.net/comp/daeryunBrochure.pdf'
|
|
12
|
+
},
|
|
13
|
+
estate: {
|
|
14
|
+
text: '건설부동산그룹 브로슈어',
|
|
15
|
+
link: 'https://d1tgonli21s4df.cloudfront.net/estate-group/daeryunBrochure_estate.pdf'
|
|
16
|
+
},
|
|
17
|
+
military: {
|
|
18
|
+
text: '국방군사그룹 브로슈어',
|
|
19
|
+
link: 'https://d1tgonli21s4df.cloudfront.net/military/military_group_intro.pdf'
|
|
20
|
+
},
|
|
21
|
+
guard: {
|
|
22
|
+
text: '경호센터 브로슈어',
|
|
23
|
+
link: 'https://d1tgonli21s4df.cloudfront.net/guard/daeryunBrochure_guard.pdf'
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
const brochure = brochureMap[type];
|
|
27
|
+
return (<Link href={(_a = brochure.link) !== null && _a !== void 0 ? _a : '#'} rel={'nofollow'} target={'_blank'} style={{
|
|
12
28
|
width: width,
|
|
13
29
|
height: height,
|
|
14
30
|
borderRadius: rounded ? '1000px' : '0'
|
|
@@ -25,7 +41,7 @@ const BrochureBtn = (props) => {
|
|
|
25
41
|
Brochure <span className={'font-[800]'}>download</span>
|
|
26
42
|
</p>
|
|
27
43
|
<p className={'text-[14px] font-[800] leading-none max-[590px]:text-[13px] max-xs:text-[14px]'}>
|
|
28
|
-
{text}
|
|
44
|
+
{(_b = brochure.text) !== null && _b !== void 0 ? _b : ''}
|
|
29
45
|
</p>
|
|
30
46
|
</span>
|
|
31
47
|
</Link>);
|
|
@@ -11,15 +11,31 @@ const BrochureBtn = (props: {
|
|
|
11
11
|
type?: string;
|
|
12
12
|
}) => {
|
|
13
13
|
const { rounded = true, width = '100%', height = '100%', className = '', type = 'comp' } = props;
|
|
14
|
-
const downloadUrl_comp = 'https://d1tgonli21s4df.cloudfront.net/comp/daeryunBrochure.pdf';
|
|
15
|
-
const downloadUrl_estate = 'https://d1tgonli21s4df.cloudfront.net/estate-group/daeryunBrochure_estate.pdf';
|
|
16
14
|
|
|
17
|
-
const
|
|
18
|
-
|
|
15
|
+
const brochureMap: Record<string, { text: string; link: string }> = {
|
|
16
|
+
comp: {
|
|
17
|
+
text: '기업법무 브로슈어',
|
|
18
|
+
link: 'https://d1tgonli21s4df.cloudfront.net/comp/daeryunBrochure.pdf'
|
|
19
|
+
},
|
|
20
|
+
estate: {
|
|
21
|
+
text: '건설부동산그룹 브로슈어',
|
|
22
|
+
link: 'https://d1tgonli21s4df.cloudfront.net/estate-group/daeryunBrochure_estate.pdf'
|
|
23
|
+
},
|
|
24
|
+
military: {
|
|
25
|
+
text: '국방군사그룹 브로슈어',
|
|
26
|
+
link: 'https://d1tgonli21s4df.cloudfront.net/military/military_group_intro.pdf'
|
|
27
|
+
},
|
|
28
|
+
guard: {
|
|
29
|
+
text: '경호센터 브로슈어',
|
|
30
|
+
link: 'https://d1tgonli21s4df.cloudfront.net/guard/daeryunBrochure_guard.pdf'
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const brochure = brochureMap[type];
|
|
19
35
|
|
|
20
36
|
return (
|
|
21
37
|
<Link
|
|
22
|
-
href={link}
|
|
38
|
+
href={brochure.link ?? '#'}
|
|
23
39
|
rel={'nofollow'}
|
|
24
40
|
target={'_blank'}
|
|
25
41
|
style={{
|
|
@@ -53,7 +69,7 @@ const BrochureBtn = (props: {
|
|
|
53
69
|
Brochure <span className={'font-[800]'}>download</span>
|
|
54
70
|
</p>
|
|
55
71
|
<p className={'text-[14px] font-[800] leading-none max-[590px]:text-[13px] max-xs:text-[14px]'}>
|
|
56
|
-
{text}
|
|
72
|
+
{brochure.text ?? ''}
|
|
57
73
|
</p>
|
|
58
74
|
</span>
|
|
59
75
|
</Link>
|