@daeryun/dr_components 0.2.25 → 0.2.27

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.
@@ -0,0 +1,730 @@
1
+ import React, { InputHTMLAttributes, useEffect, useState } from 'react';
2
+ import Image from 'next/image';
3
+ import IconMt from '../../../asset/images/choice/mt_icon.svg';
4
+ import { IConsulting, IDetail, IField } from './IConsultingTypes';
5
+ import { bodyFetch, formatPhoneNumber, insert, savePowerLinkConversion } from '../../../lib';
6
+ import { SelectBox } from '../../SelectBox/SelectBox';
7
+ import axios from 'axios';
8
+ import mobile from 'is-mobile';
9
+ import { useRouter } from 'next/router';
10
+ import ChoiceLock from '../../../asset/images/consulting/choice_lock.webp';
11
+ import NewChoiceConsulting from '../../../asset/images/consulting/new_choice_consulting.webp';
12
+ import Loader from '../../Loader/Loader';
13
+
14
+ const Index = (props: { ace_Click?: () => void }) => {
15
+ const conversionType = 'consult';
16
+ const router = useRouter();
17
+
18
+ //폼데이터
19
+ const [consulting, setConsulting] = useState<IConsulting>({
20
+ cc_name: '',
21
+ cc_tel: '',
22
+ law_type_code: '',
23
+ contents: '',
24
+ c_type: '',
25
+ detail: null,
26
+ isCheck: false
27
+ });
28
+
29
+ //detail
30
+ const [detail, setDetail] = useState<IDetail>({
31
+ comp_name: '',
32
+ comp_address: '',
33
+ comp_business: '',
34
+ comp_size: '',
35
+ comp_managerName: '',
36
+ comp_managerPos: '',
37
+ comp_email: ''
38
+ });
39
+
40
+ // 사건분야 data
41
+ const [fields, setFields] = useState<IField[]>([]);
42
+
43
+ //로딩
44
+ const [isLoading, setIsLoading] = useState<boolean>(false);
45
+
46
+ //모바일
47
+ const [isMobile, setIsMobile] = useState<boolean>(false);
48
+
49
+ const detailNameMap = new Map([
50
+ ['comp_name', '기업명'],
51
+ ['comp_address', '기업주소'],
52
+ ['comp_business', '업종'],
53
+ ['comp_size', '규모'],
54
+ ['comp_managerName', '담당자명'],
55
+ ['comp_managerPos', '부서/직급'],
56
+ ['comp_email', '이메일']
57
+ ]);
58
+
59
+ const consultPost = async () => {
60
+ setIsLoading(true);
61
+ if (!consulting.isCheck) {
62
+ alert('개인정보 제공에 동의해주세요');
63
+ setIsLoading(false);
64
+ return false;
65
+ }
66
+ if (consulting.c_type === '') {
67
+ alert('문의 유형을 선택해주세요.');
68
+ setIsLoading(false);
69
+ return false;
70
+ }
71
+ if (consulting.cc_name === '') {
72
+ alert('기업명을 입력해주세요.');
73
+ setIsLoading(false);
74
+ return false;
75
+ }
76
+ if (detail.comp_managerName === '') {
77
+ alert('담당자 명을 입력해주세요.');
78
+ setIsLoading(false);
79
+ return false;
80
+ }
81
+ if (consulting.cc_tel === '') {
82
+ alert('연락처를 입력해주세요.');
83
+ setIsLoading(false);
84
+ return false;
85
+ }
86
+
87
+ insert(conversionType, isMobile);
88
+
89
+ if (props.ace_Click) {
90
+ props.ace_Click();
91
+ }
92
+
93
+ bodyFetch(
94
+ '/api/consulting',
95
+ {
96
+ ...consulting,
97
+ detail: Object.fromEntries(
98
+ // 한글로 변경
99
+ Object.entries(detail).map(([key, value]) => [detailNameMap.get(key) || key, value])
100
+ )
101
+ },
102
+ (obj: any) => {
103
+ if (obj.result) {
104
+ setConsulting({
105
+ cc_name: '',
106
+ cc_tel: '',
107
+ law_type_code: '',
108
+ contents: '',
109
+ c_type: '',
110
+ detail: null,
111
+ isCheck: false
112
+ });
113
+ setDetail({
114
+ comp_name: '',
115
+ comp_address: '',
116
+ comp_business: '',
117
+ comp_size: '',
118
+ comp_managerName: '',
119
+ comp_managerPos: '',
120
+ comp_email: ''
121
+ });
122
+
123
+ if (obj.msg) {
124
+ alert(obj.msg);
125
+ setIsLoading(false);
126
+ }
127
+
128
+ if (!obj.isNotComplete) {
129
+ savePowerLinkConversion('online', isMobile);
130
+ router.push({ pathname: '/complete', query: { isConsult: true } }, '/complete');
131
+ }
132
+ } else {
133
+ alert('상담 신청에 실패했습니다. 잠시후 다시 시도해주세요.');
134
+ setIsLoading(false);
135
+ }
136
+ },
137
+ 'POST'
138
+ );
139
+ };
140
+
141
+ //사건분야 데이터 가져오기
142
+ useEffect(() => {
143
+ axios.get('/api/field/list?code=corporation').then(response => {
144
+ const compFieldData = response.data.list;
145
+ setFields(compFieldData);
146
+ });
147
+ setIsMobile(mobile());
148
+ }, []);
149
+
150
+ return (
151
+ <>
152
+ {isLoading ? <Loader fullScreen /> : <></>}
153
+ <div
154
+ className={
155
+ 'mt-[150px] flex h-[270px] w-full flex-col justify-between rounded-[15px] border-[2px] border-solid border-[#285EA7] px-[40px] py-[30px] ' +
156
+ //1500px
157
+ 'max-3xl:mt-[100px] ' +
158
+ //1024px
159
+ 'max-lg:mt-[60px] max-lg:h-[230px] ' +
160
+ //768px
161
+ 'max-md:h-auto max-md:p-[35px] ' +
162
+ //480px
163
+ 'max-xs:p-[25px] ' +
164
+ //325px
165
+ 'max-3xs:p-[20px]'
166
+ }
167
+ >
168
+ <span
169
+ className={
170
+ 'relative flex items-end gap-[50px] p-[20px] ' +
171
+ //1500px
172
+ 'max-3xl:gap-[40px] ' +
173
+ //1024px
174
+ 'max-lg:gap-[30px] max-lg:p-[10px] ' +
175
+ //768px
176
+ 'max-md:mb-[20px] max-md:flex-col max-md:items-start max-md:gap-[15px] max-md:p-0 ' +
177
+ //480px
178
+ 'max-xs:gap-[10px] max-xs:pt-[5px]'
179
+ }
180
+ >
181
+ <Image
182
+ src={NewChoiceConsulting}
183
+ alt={'consulting icon'}
184
+ width={216}
185
+ height={183}
186
+ className={
187
+ 'h-auto w-[96px] object-contain object-top ' +
188
+ //1024px
189
+ 'max-lg:w-[75px] ' +
190
+ //768px
191
+ 'max-md:w-[65px] ' +
192
+ //480px
193
+ 'max-xs:w-[55px] '
194
+ }
195
+ />
196
+ <span>
197
+ <h2
198
+ className={
199
+ 'text-[38px] font-[800] leading-[48px] tracking-[-1.9px] text-[#285EA7] ' +
200
+ //1500px
201
+ 'max-3xl:text-[36px] max-3xl:leading-[46px] ' +
202
+ //1024px
203
+ 'max-lg:text-[30px] max-lg:leading-[40px] ' +
204
+ //480px
205
+ 'max-xs:text-[26px] ' +
206
+ //325px
207
+ 'max-3xs:text-[24px]'
208
+ }
209
+ >
210
+ 기업고객
211
+ </h2>
212
+ <p
213
+ className={
214
+ 'mt-[10px] text-[22px] leading-[30px] tracking-[-0.55px] text-[#343434] ' +
215
+ //1500px
216
+ 'max-3xl:mt-[5px] max-3xl:text-[20px] max-3xl:leading-[30px] ' +
217
+ //1024px
218
+ 'max-lg:mt-[3px] max-lg:text-[16px] max-lg:leading-[22px] '
219
+ }
220
+ >
221
+ 기업법무자문 · 일반소송대응 등 <br className={'md:hidden'} />
222
+ 기업고객 맞춤 법률서비스를 제공합니다.
223
+ </p>
224
+ </span>
225
+ </span>
226
+ <div
227
+ className={
228
+ 'flex w-full items-center justify-start gap-[15px] rounded-[15px] bg-[#285EA7] bg-opacity-5 px-[30px] py-[14px] tracking-[-0.35px] ' +
229
+ //480px
230
+ 'max-xs:px-[20px]'
231
+ }
232
+ >
233
+ <Image
234
+ src={ChoiceLock}
235
+ alt={'choice_lock'}
236
+ width={39}
237
+ height={52}
238
+ className={
239
+ 'h-auto w-[17px] translate-y-[-1px] ' +
240
+ //1024px
241
+ 'max-lg:w-[15px]'
242
+ }
243
+ />
244
+ <p
245
+ className={
246
+ 'break-keep text-lg leading-none tracking-[-0.45px] text-[#3C3C3C] ' +
247
+ //1024px
248
+ 'max-lg:text-base max-lg:leading-[20px] ' +
249
+ //480px
250
+ 'max-xs:text-[14px] max-xs:leading-[18px] '
251
+ }
252
+ >
253
+ 안심하세요! 의뢰인의 상담 내용에 대한 비밀유지를 약속합니다.
254
+ </p>
255
+ </div>
256
+ </div>
257
+ <div className={'relative mb-[60px] mt-[40px] h-auto w-[100%] '}>
258
+ <span
259
+ className={
260
+ 'block h-[1px] w-full bg-[#CECECE] ' +
261
+ 'after:absolute after:right-0 after:top-0 after:block after:h-[10px] after:w-[10px] after:-translate-y-[50%] after:rounded-full after:bg-[#CECECE] after:content-[""] ' +
262
+ 'before:absolute before:left-0 before:top-0 before:block before:h-[10px] before:w-[10px] before:-translate-y-[50%] before:rounded-full before:bg-[#285FA2] before:content-[""]'
263
+ }
264
+ ></span>
265
+ <span className={'flex h-auto w-full flex-col px-[26px] py-[22px]'}>
266
+ <div className={'relative mb-[10px] h-auto w-[37px]'}>
267
+ <IconMt />
268
+ </div>
269
+ <p
270
+ className={
271
+ 'mb-[10px] break-keep text-[18px] leading-[1.35] tracking-[-0.72px] text-[#6C6C6C] ' +
272
+ //1500px
273
+ 'max-3xl:text-[16px] ' +
274
+ //1024px
275
+ 'max-lg:text-[18px] max-lg:leading-[1.5] ' +
276
+ //480px
277
+ 'max-xs:text-[16px] ' +
278
+ //325px
279
+ 'max-3xs:text-[14px]'
280
+ }
281
+ >
282
+ 퀄리티 높은 상담 제공을 위해 하루 상담 수에 제한을 두고 있어{' '}
283
+ <span className={'font-bold'}>상담 예약이 빠르게 마감되고 있습니다.</span>
284
+ <br />
285
+ <br className={''} />
286
+ 모든 상담은 전문변호사가 사건 검토를 마친 뒤{' '}
287
+ <span className={'font-bold'}>전문적으로 진행하기에 예약제로 실시됩니다.</span>
288
+ <br />
289
+ <br className={''} />
290
+ 가급적 빠른 상담 예약을 권유드리며, 예약 시간 준수를 부탁드립니다. 만족스러운 상담을 위해 최선을
291
+ 다하겠습니다.
292
+ <br className={''} />
293
+ <br className={''} />※ 단, 상담 예약이 확정된 경우라도 동시간에 긴급한 우선 상담 사안이
294
+ 발생하거나 회사 내부사정에 따라 상담 일정이 조정되거나 취소될 수 있습니다.
295
+ </p>
296
+ </span>
297
+ <span
298
+ className={
299
+ 'block h-[1px] w-full bg-[#CECECE] ' +
300
+ 'after:absolute after:bottom-0 after:right-0 after:block after:h-[10px] after:w-[10px] after:translate-y-[50%] after:rounded-full after:bg-[#285FA2] after:content-[""] ' +
301
+ 'before:absolute before:bottom-0 before:left-0 before:block before:h-[10px] before:w-[10px] before:translate-y-[50%] before:rounded-full before:bg-[#CECECE] before:content-[""]'
302
+ }
303
+ ></span>
304
+ </div>
305
+ {/*문의 폼*/}
306
+ <div
307
+ className={
308
+ 'mx-auto mb-[80px] mt-[30px] ' +
309
+ //1024px
310
+ 'max-lg:w-full'
311
+ }
312
+ >
313
+ <span
314
+ className={
315
+ 'flex items-start justify-between border-b-[1px] border-solid border-b-[#D5D5D5] py-[40px] ' +
316
+ //1024px
317
+ 'max-lg:flex-col max-lg:gap-[30px] max-lg:py-[30px]'
318
+ }
319
+ >
320
+ <FormTitle text={'문의 유형'} />
321
+ <span
322
+ className={
323
+ 'flex w-full max-w-[800px] gap-[30px] pl-[80px] ' +
324
+ //1024px
325
+ 'max-lg:max-w-[unset] max-lg:px-[20px]'
326
+ }
327
+ >
328
+ <label
329
+ className={
330
+ 'flex w-fit cursor-pointer items-start gap-[10px] text-[20px] font-[600] leading-none tracking-[-1px] ' +
331
+ //768px
332
+ 'max-md:text-[18px] max-md:leading-[20px]'
333
+ }
334
+ >
335
+ <input
336
+ type="radio"
337
+ name={'type'}
338
+ className={
339
+ 'h-[18px] w-[18px] cursor-pointer outline-none ' +
340
+ 'after:pointer-events-none after:box-border after:block after:h-full after:w-full after:rounded-full after:bg-white after:outline after:outline-[1px] after:outline-[#B4B4B4] after:content-[""] ' +
341
+ 'checked:after:border-[3px] checked:after:border-solid checked:after:border-[#fff] checked:after:bg-[#285FA7] checked:after:outline-[#285FA7]'
342
+ }
343
+ value={'comp_consult'}
344
+ onChange={e => {
345
+ setConsulting({ ...consulting, c_type: e.target.value });
346
+ }}
347
+ />
348
+ 기업법무자문
349
+ </label>
350
+ <label
351
+ className={
352
+ 'flex w-fit cursor-pointer items-start gap-[10px] text-[20px] font-[600] leading-none tracking-[-1px] ' +
353
+ //768px
354
+ 'max-md:text-[18px] max-md:leading-[20px]'
355
+ }
356
+ >
357
+ <input
358
+ type="radio"
359
+ name={'type'}
360
+ className={
361
+ 'h-[18px] w-[18px] cursor-pointer outline-none ' +
362
+ 'after:pointer-events-none after:box-border after:block after:h-full after:w-full after:rounded-full after:bg-white after:outline after:outline-[1px] after:outline-[#B4B4B4] after:content-[""] ' +
363
+ 'checked:after:border-[3px] checked:after:border-solid checked:after:border-[#fff] checked:after:bg-[#285FA7] checked:after:outline-[#285FA7]'
364
+ }
365
+ value={'comp_suit'}
366
+ onChange={e => {
367
+ setConsulting({ ...consulting, c_type: e.target.value });
368
+ }}
369
+ />
370
+ 기업소송
371
+ </label>
372
+ </span>
373
+ </span>
374
+ <span
375
+ className={
376
+ 'flex items-start justify-between border-b-[1px] border-solid border-b-[#D5D5D5] py-[40px] ' +
377
+ //1024px
378
+ 'max-lg:flex-col max-lg:gap-[30px] max-lg:py-[30px]'
379
+ }
380
+ >
381
+ <FormTitle text={'기업 정보'} />
382
+ <span
383
+ className={
384
+ 'flex w-full max-w-[800px] flex-col gap-[30px] pl-[80px] ' +
385
+ //1024px
386
+ 'max-lg:max-w-[unset] max-lg:px-[20px] '
387
+ }
388
+ >
389
+ <span
390
+ className={
391
+ 'flex w-full items-center justify-between ' +
392
+ //768px
393
+ 'max-md:flex-col max-md:items-start max-md:gap-[10px]'
394
+ }
395
+ >
396
+ <InputTitle text={'기업명'} isRequired={true} />
397
+ <InputStyleBox
398
+ value={consulting.cc_name}
399
+ onChange={e => {
400
+ setConsulting({ ...consulting, cc_name: e.target.value });
401
+ setDetail({ ...detail, comp_name: e.target.value });
402
+ }}
403
+ placeholder={'예시) (주) 000'}
404
+ />
405
+ </span>
406
+ <span
407
+ className={
408
+ 'flex w-full items-center justify-between ' +
409
+ //768px
410
+ 'max-md:flex-col max-md:items-start max-md:gap-[10px]'
411
+ }
412
+ >
413
+ <InputTitle text={'기업주소(구까지 기재)'} />
414
+ <InputStyleBox
415
+ value={detail.comp_address}
416
+ onChange={e => {
417
+ setDetail({ ...detail, comp_address: e.target.value });
418
+ }}
419
+ placeholder={'예시) 서울시 중구'}
420
+ />
421
+ </span>
422
+ <span
423
+ className={
424
+ 'flex w-full items-center justify-between ' +
425
+ //768px
426
+ 'max-md:flex-col max-md:items-start max-md:gap-[10px]'
427
+ }
428
+ >
429
+ <InputTitle text={'업종'} />
430
+ <InputStyleBox
431
+ value={detail.comp_business}
432
+ onChange={e => {
433
+ setDetail({ ...detail, comp_business: e.target.value });
434
+ }}
435
+ placeholder={'예시) 금융업'}
436
+ />
437
+ </span>{' '}
438
+ <span
439
+ className={
440
+ 'flex w-full items-center justify-between ' +
441
+ //768px
442
+ 'max-md:flex-col max-md:items-start max-md:gap-[10px]'
443
+ }
444
+ >
445
+ <InputTitle text={'규모(연 매출액, 직원수)'} />
446
+ <InputStyleBox
447
+ value={detail.comp_size}
448
+ onChange={e => {
449
+ setDetail({ ...detail, comp_size: e.target.value });
450
+ }}
451
+ placeholder={'입력해주세요'}
452
+ />
453
+ </span>
454
+ </span>
455
+ </span>
456
+ <span
457
+ className={
458
+ 'flex items-start justify-between border-b-[1px] border-solid border-b-[#D5D5D5] py-[40px] ' +
459
+ //1024px
460
+ 'max-lg:flex-col max-lg:gap-[30px] max-lg:py-[30px]'
461
+ }
462
+ >
463
+ <FormTitle text={'담당자 정보'} />
464
+ <span
465
+ className={
466
+ 'flex w-full max-w-[800px] flex-col gap-[30px] pl-[80px] ' +
467
+ //1024px
468
+ 'max-lg:max-w-[unset] max-lg:px-[20px]'
469
+ }
470
+ >
471
+ <span
472
+ className={
473
+ 'flex w-full items-center justify-between ' +
474
+ //768px
475
+ 'max-md:flex-col max-md:items-start max-md:gap-[10px]'
476
+ }
477
+ >
478
+ <InputTitle text={'담당자명'} isRequired={true} />
479
+ <InputStyleBox
480
+ value={detail.comp_managerName}
481
+ onChange={e => {
482
+ setDetail({ ...detail, comp_managerName: e.target.value });
483
+ }}
484
+ placeholder={'입력해주세요'}
485
+ />
486
+ </span>
487
+ <span
488
+ className={
489
+ 'flex w-full items-center justify-between ' +
490
+ //768px
491
+ 'max-md:flex-col max-md:items-start max-md:gap-[10px]'
492
+ }
493
+ >
494
+ <InputTitle text={'부서/직급'} />
495
+ <InputStyleBox
496
+ value={detail.comp_managerPos}
497
+ onChange={e => {
498
+ setDetail({ ...detail, comp_managerPos: e.target.value });
499
+ }}
500
+ placeholder={'입력해주세요'}
501
+ />
502
+ </span>
503
+ <span
504
+ className={
505
+ 'flex w-full items-center justify-between ' +
506
+ //768px
507
+ 'max-md:flex-col max-md:items-start max-md:gap-[10px]'
508
+ }
509
+ >
510
+ <InputTitle text={'연락처'} isRequired={true} />
511
+ <InputStyleBox
512
+ value={consulting.cc_tel}
513
+ onChange={e => {
514
+ setConsulting({ ...consulting, cc_tel: formatPhoneNumber(e.target.value) });
515
+ }}
516
+ placeholder={'-없이 입력해주세요'}
517
+ />
518
+ </span>{' '}
519
+ <span
520
+ className={
521
+ 'flex w-full items-center justify-between ' +
522
+ //768px
523
+ 'max-md:flex-col max-md:items-start max-md:gap-[10px]'
524
+ }
525
+ >
526
+ <InputTitle text={'이메일'} />
527
+ <InputStyleBox
528
+ value={detail.comp_email}
529
+ onChange={e => {
530
+ setDetail({ ...detail, comp_email: e.target.value });
531
+ }}
532
+ placeholder={'입력해주세요'}
533
+ />
534
+ </span>
535
+ </span>
536
+ </span>
537
+ <span
538
+ className={
539
+ 'flex items-start justify-between border-b-[1px] border-solid border-b-[#D5D5D5] py-[40px] ' +
540
+ //1024px
541
+ 'max-lg:flex-col max-lg:gap-[30px] max-lg:py-[30px]'
542
+ }
543
+ >
544
+ <FormTitle text={'문의 내용'} />
545
+ <span
546
+ className={
547
+ 'flex w-full max-w-[800px] flex-col gap-[30px] pl-[80px] ' +
548
+ //1024px
549
+ 'max-lg:max-w-[unset] max-lg:px-[20px] ' +
550
+ //768px
551
+ 'max-md:gap-[20px]'
552
+ }
553
+ >
554
+ <span
555
+ className={
556
+ 'flex gap-[10px] ' +
557
+ //768px
558
+ 'max-md:w-full max-md:flex-col max-md:items-start max-md:gap-[10px]'
559
+ }
560
+ >
561
+ <SelectBox
562
+ items={fields}
563
+ id={'사건분야'}
564
+ value={consulting.law_type_code}
565
+ onSelect={(codename, code) => {
566
+ setConsulting({ ...consulting, law_type_code: code });
567
+ }}
568
+ icon={
569
+ <Image
570
+ src={
571
+ process.env.NEXT_PUBLIC_S3_URL +
572
+ '/consult/main/section6/icon_arrow_gray.webp'
573
+ }
574
+ alt={'select icon'}
575
+ width={28}
576
+ height={15}
577
+ className={
578
+ 'absolute right-[24px] top-[50%] w-[15px] translate-y-[-50%] max-xs:w-[11px]'
579
+ }
580
+ />
581
+ }
582
+ style={
583
+ 'h-[60px] w-full px-[20px] border-solid border-[1px] border-[#D0D0D0] text-[18px] cursor-pointer transition-[border] ' +
584
+ 'focus-visible:outline-none focus-visible:border-[#285FA7] ' +
585
+ 'max-sm:w-full max-xs:h-[50px] max-xs:flex-none max-xs:text-[14px] max-xs:px-[15px] max-xs:py-0'
586
+ }
587
+ parentStyle={'flex-1 w-full'}
588
+ placeholderOptions={'사건분야'}
589
+ />
590
+ {/*<SelectBox*/}
591
+ {/* items={[{ code: '', codename: '' }]}*/}
592
+ {/* id={'사건유형'}*/}
593
+ {/* value={''}*/}
594
+ {/* onSelect={() => {}}*/}
595
+ {/* icon={*/}
596
+ {/* <Image*/}
597
+ {/* src={'/images/main/section6/icon_arrow_gray.webp'}*/}
598
+ {/* alt={'select icon'}*/}
599
+ {/* width={28}*/}
600
+ {/* height={15}*/}
601
+ {/* className={*/}
602
+ {/* 'absolute top-[50%] translate-y-[-50%] right-[24px] w-[15px] max-xs:w-[11px]'*/}
603
+ {/* }*/}
604
+ {/* />*/}
605
+ {/* }*/}
606
+ {/* style={*/}
607
+ {/* 'h-[60px] w-full px-[20px] border-solid border-[1px] border-[#D0D0D0] text-[18px] cursor-pointer transition-[border] ' +*/}
608
+ {/* 'focus-visible:outline-none focus-visible:border-[#285FA7] ' +*/}
609
+ {/* 'max-sm:w-full max-xs:h-[50px] max-xs:flex-none max-xs:text-[14px] max-xs:px-[15px] max-xs:py-0'*/}
610
+ {/* }*/}
611
+ {/* parentStyle={'flex-1 w-full'}*/}
612
+ {/* placeholderOptions={'사건유형'}*/}
613
+ {/*/>*/}
614
+ </span>
615
+ <textarea
616
+ placeholder={'내용을 입력해주세요'}
617
+ spellCheck={false}
618
+ maxLength={500}
619
+ className={
620
+ 'h-[350px] w-full resize-none border-[1px] border-solid border-[#D0D0D0] p-[20px] text-[18px] leading-[24px] transition-[border] placeholder:text-[#848484] ' +
621
+ 'focus-visible:border-[#285FA7] focus-visible:outline-none ' +
622
+ //1024px
623
+ 'max-lg:h-[280px] max-lg:p-[20px]'
624
+ }
625
+ onChange={e => {
626
+ setConsulting({ ...consulting, contents: e.target.value });
627
+ }}
628
+ value={consulting.contents}
629
+ />
630
+ </span>
631
+ </span>
632
+ <span
633
+ className={
634
+ 'mx-auto mt-[50px] block max-w-[570px] ' +
635
+ //768px
636
+ 'max-md:mt-[30px] ' +
637
+ //480px
638
+ 'max-xs:max-w-[240px]'
639
+ }
640
+ >
641
+ {/*-- 동의 체크박스 --*/}
642
+ <label
643
+ className={
644
+ 'mb-[30px] block w-full cursor-pointer text-[16px] leading-[16px] text-[#5F5F5F] ' +
645
+ 'flex items-center justify-center gap-[10px] ' +
646
+ 'max-sm:justify-center max-xs:text-base'
647
+ }
648
+ >
649
+ <input
650
+ type="checkbox"
651
+ name="consultCheck"
652
+ id="consultCk"
653
+ className={
654
+ 'h-[17px] w-[17px] cursor-pointer outline-none ' +
655
+ 'after:pointer-events-none after:block after:h-full after:w-full after:border-[1px] after:border-solid after:border-[#B4B4B4] after:bg-white after:font-[SUIT] after:font-[800] after:content-[""] ' +
656
+ 'checked:after:border-[#285FA7] checked:after:bg-[#285FA7] checked:after:text-center checked:after:text-[17px] checked:after:leading-[15px] checked:after:text-white checked:after:content-["✓"] '
657
+ }
658
+ onChange={e => {
659
+ setConsulting({ ...consulting, isCheck: !consulting.isCheck });
660
+ }}
661
+ checked={consulting.isCheck}
662
+ />
663
+ 개인정보수집에 동의합니다.
664
+ </label>
665
+ {/*-- 제출 submit 버튼 --*/}
666
+ <button
667
+ type="button"
668
+ id={'submitBtn'}
669
+ className={
670
+ 'h-[70px] w-full cursor-pointer bg-[#285FA7] text-xl tracking-[-0.5px] text-white ' +
671
+ 'max-xs:h-[50px] max-xs:text-base'
672
+ }
673
+ onClick={consultPost}
674
+ disabled={isLoading}
675
+ >
676
+ 상담신청서 제출
677
+ </button>
678
+ </span>
679
+ </div>
680
+ </>
681
+ );
682
+ };
683
+
684
+ export default Index;
685
+
686
+ const FormTitle = (props: { text: string }) => {
687
+ return (
688
+ <p
689
+ className={
690
+ 'flex w-[130px] flex-shrink-0 items-center gap-[12px] text-[24px] font-[600] leading-none tracking-[-1.2px] text-[#285EA7] ' +
691
+ 'before:block before:h-[6px] before:w-[6px] before:rounded-full before:bg-[#285EA7] before:content-[""] ' +
692
+ //1024px
693
+ 'max-lg:text-[22px]'
694
+ }
695
+ >
696
+ {props.text}
697
+ </p>
698
+ );
699
+ };
700
+
701
+ const InputTitle = (props: { text: string; isRequired?: boolean }) => {
702
+ return (
703
+ <p
704
+ className={
705
+ 'relative w-[220px] flex-shrink-0 text-[20px] font-[600] tracking-[-0.5px] ' +
706
+ //768px
707
+ 'max-md:text-[18px] ' +
708
+ `${
709
+ props.isRequired &&
710
+ 'before:absolute before:left-[-12px] before:text-[16px] before:leading-none before:text-[#dc143c] before:content-["*"]'
711
+ }`
712
+ }
713
+ >
714
+ {props.text}
715
+ </p>
716
+ );
717
+ };
718
+
719
+ const InputStyleBox = (props: InputHTMLAttributes<HTMLInputElement>) => {
720
+ return (
721
+ <input
722
+ className={
723
+ 'h-[50px] w-full max-w-[580px] border-[1px] border-solid border-[#D0D0D0] px-[20px] text-lg tracking-[-0.45px] transition-[border] placeholder:text-[#848484] ' +
724
+ 'focus-visible:border-[#285FA7] focus-visible:outline-none '
725
+ }
726
+ {...props}
727
+ spellCheck={false}
728
+ />
729
+ );
730
+ };