@daeryun/dr_components 0.6.37 → 0.6.39

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.
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
- import Image from 'next/image';
3
2
  import LinkRight from '../../asset/images/daeryuntalk/link_right.svg';
4
3
  import EmptyMessage from '../../asset/images/daeryuntalk/empty_message.svg';
4
+ import SendIcon from '../../asset/images/daeryuntalk/send.svg';
5
+ import PrevIcon from '../../asset/images/daeryuntalk/prev.svg';
5
6
  const mockChatHistories = [];
6
7
  const HistoryView = ({ onBackClick, onChatHistoryClick, onNewChatClick }) => {
7
8
  const formatTimestamp = (timestamp) => {
@@ -27,7 +28,7 @@ const HistoryView = ({ onBackClick, onChatHistoryClick, onNewChatClick }) => {
27
28
  return (<div className="flex h-full flex-col">
28
29
  <div className="flex items-center justify-between border-b border-gray-200 p-4">
29
30
  <button className="flex h-7 w-7 items-center justify-center" aria-label="이전" onClick={onBackClick}>
30
- <Image src="/images/daeryuntalk/prev.svg" alt="이전" width={28} height={28}/>
31
+ <PrevIcon width={28} height={28}/>
31
32
  </button>
32
33
  <div className="flex items-center">
33
34
  <h2 className="font-bold leading-[140%] tracking-[-4%]">히스토리</h2>
@@ -60,7 +61,7 @@ const HistoryView = ({ onBackClick, onChatHistoryClick, onNewChatClick }) => {
60
61
  <div className="p-4">
61
62
  <button className="flex w-full items-center justify-center gap-2.5 rounded-[25px] bg-[#2E385B] px-6 py-3 text-white" onClick={onNewChatClick}>
62
63
  새 문의하기
63
- <Image src="/images/daeryuntalk/send.svg" alt="" width={24} height={24} aria-hidden="true"/>
64
+ <SendIcon width={24} height={24}/>
64
65
  </button>
65
66
  </div>
66
67
  </div>);
@@ -2,7 +2,9 @@ import React from 'react';
2
2
  import Image from 'next/image';
3
3
  import LinkRight from '../../asset/images/daeryuntalk/link_right.svg';
4
4
  import EmptyMessage from '../../asset/images/daeryuntalk/empty_message.svg';
5
-
5
+ import SendIcon from '../../asset/images/daeryuntalk/send.svg';
6
+ import PrevIcon from '../../asset/images/daeryuntalk/prev.svg';
7
+ import DaeryunLogoIcon from '../../asset/images/daeryuntalk/daeryun-logo.svg';
6
8
  const mockChatHistories: any[] = [];
7
9
 
8
10
  type HistoryViewProps = {
@@ -42,7 +44,7 @@ const HistoryView: React.FC<HistoryViewProps> = ({ onBackClick, onChatHistoryCli
42
44
  <div className="flex h-full flex-col">
43
45
  <div className="flex items-center justify-between border-b border-gray-200 p-4">
44
46
  <button className="flex h-7 w-7 items-center justify-center" aria-label="이전" onClick={onBackClick}>
45
- <Image src="/images/daeryuntalk/prev.svg" alt="이전" width={28} height={28} />
47
+ <PrevIcon width={28} height={28} />
46
48
  </button>
47
49
  <div className="flex items-center">
48
50
  <h2 className="font-bold leading-[140%] tracking-[-4%]">히스토리</h2>
@@ -88,7 +90,7 @@ const HistoryView: React.FC<HistoryViewProps> = ({ onBackClick, onChatHistoryCli
88
90
  onClick={onNewChatClick}
89
91
  >
90
92
  새 문의하기
91
- <Image src="/images/daeryuntalk/send.svg" alt="" width={24} height={24} aria-hidden="true" />
93
+ <SendIcon width={24} height={24} />
92
94
  </button>
93
95
  </div>
94
96
  </div>
@@ -1,11 +1,12 @@
1
1
  import React, { useState } from 'react';
2
- import Image from 'next/image';
2
+ import NoticeIcon from '../../asset/images/daeryuntalk/notice.svg';
3
+ import PrevIcon from '../../asset/images/daeryuntalk/prev.svg';
3
4
  const NoticeMessage = ({ content }) => {
4
5
  const [isExpanded, setIsExpanded] = useState(false);
5
6
  return (<div className="blur-xs bg-[#F7F7F7]/90 p-2 backdrop-blur-sm">
6
7
  <div className="flex items-start">
7
8
  <div className="mr-2 flex-shrink-0">
8
- <Image src="/images/daeryuntalk/notice.svg" alt="공지" width={20} height={20}/>
9
+ <NoticeIcon width={20} height={20}/>
9
10
  </div>
10
11
  <div className="flex-1">
11
12
  <div className={`overflow-hidden text-sm leading-[130%] tracking-[-4%] ${isExpanded ? '' : 'line-clamp-2'}`}>
@@ -14,7 +15,7 @@ const NoticeMessage = ({ content }) => {
14
15
  </div>
15
16
  <button onClick={() => setIsExpanded(!isExpanded)} className="ml-1 flex-shrink-0 transform transition-transform duration-200" aria-label={isExpanded ? '접기' : '펼치기'}>
16
17
  <div className={`transform transition-transform duration-200 ${isExpanded ? 'rotate-90' : '-rotate-90'}`}>
17
- <Image src="/images/daeryuntalk/prev.svg" alt={isExpanded ? '접기' : '펼치기'} width={20} height={20}/>
18
+ <PrevIcon width={20} height={20}/>
18
19
  </div>
19
20
  </button>
20
21
  </div>
@@ -1,5 +1,7 @@
1
1
  import React, { useState } from 'react';
2
2
  import Image from 'next/image';
3
+ import NoticeIcon from '../../asset/images/daeryuntalk/notice.svg';
4
+ import PrevIcon from '../../asset/images/daeryuntalk/prev.svg';
3
5
 
4
6
  type NoticeMessageProps = {
5
7
  content: string;
@@ -12,7 +14,7 @@ const NoticeMessage: React.FC<NoticeMessageProps> = ({ content }) => {
12
14
  <div className="blur-xs bg-[#F7F7F7]/90 p-2 backdrop-blur-sm">
13
15
  <div className="flex items-start">
14
16
  <div className="mr-2 flex-shrink-0">
15
- <Image src="/images/daeryuntalk/notice.svg" alt="공지" width={20} height={20} />
17
+ <NoticeIcon width={20} height={20} />
16
18
  </div>
17
19
  <div className="flex-1">
18
20
  <div
@@ -29,12 +31,7 @@ const NoticeMessage: React.FC<NoticeMessageProps> = ({ content }) => {
29
31
  <div
30
32
  className={`transform transition-transform duration-200 ${isExpanded ? 'rotate-90' : '-rotate-90'}`}
31
33
  >
32
- <Image
33
- src="/images/daeryuntalk/prev.svg"
34
- alt={isExpanded ? '접기' : '펼치기'}
35
- width={20}
36
- height={20}
37
- />
34
+ <PrevIcon width={20} height={20} />
38
35
  </div>
39
36
  </button>
40
37
  </div>
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import React, { useEffect, useState } from 'react';
2
3
  import ChatButton from './ChatButton';
3
4
  import ChatWidget from './ChatWidget';
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import React, { useEffect, useState } from 'react';
2
4
  import ChatButton from './ChatButton';
3
5
  import ChatWidget from './ChatWidget';