oasis-chat-button 0.3.0 → 0.5.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/README.md +13 -6
- package/dist/react/index.cjs.js.map +1 -1
- package/dist/react/index.es.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -94,13 +94,13 @@ function App() {
|
|
|
94
94
|
return (
|
|
95
95
|
<>
|
|
96
96
|
{/* 다크 모드 */}
|
|
97
|
-
<OasisButton theme="dark" />
|
|
97
|
+
<OasisButton theme="dark" assistantUuid="your-assistant-uuid" />
|
|
98
98
|
|
|
99
99
|
{/* 라이트 모드 */}
|
|
100
|
-
<OasisButton theme="light" />
|
|
100
|
+
<OasisButton theme="light" assistantUuid="your-assistant-uuid" />
|
|
101
101
|
|
|
102
102
|
{/* 자동 모드 (시스템 설정 따름, 기본값) */}
|
|
103
|
-
<OasisButton theme="auto" />
|
|
103
|
+
<OasisButton theme="auto" assistantUuid="your-assistant-uuid" />
|
|
104
104
|
</>
|
|
105
105
|
)
|
|
106
106
|
}
|
|
@@ -117,13 +117,13 @@ import { OasisButton } from 'oasis-chat-button/vue'
|
|
|
117
117
|
|
|
118
118
|
<template>
|
|
119
119
|
<!-- 다크 모드 -->
|
|
120
|
-
<OasisButton :theme="'dark'" />
|
|
120
|
+
<OasisButton :theme="'dark'" :assistant-uuid="'your-assistant-uuid'" />
|
|
121
121
|
|
|
122
122
|
<!-- 라이트 모드 -->
|
|
123
|
-
<OasisButton :theme="'light'" />
|
|
123
|
+
<OasisButton :theme="'light'" :assistant-uuid="'your-assistant-uuid'" />
|
|
124
124
|
|
|
125
125
|
<!-- 자동 모드 (시스템 설정 따름, 기본값) -->
|
|
126
|
-
<OasisButton :theme="'auto'" />
|
|
126
|
+
<OasisButton :theme="'auto'" :assistant-uuid="'your-assistant-uuid'" />
|
|
127
127
|
</template>
|
|
128
128
|
```
|
|
129
129
|
|
|
@@ -138,16 +138,19 @@ import 'oasis-chat-button/style.css' // CSS 파일 import 필요
|
|
|
138
138
|
// 다크 모드
|
|
139
139
|
const btnDark = createButton({
|
|
140
140
|
theme: 'dark',
|
|
141
|
+
assistantUuid: 'your-assistant-uuid',
|
|
141
142
|
})
|
|
142
143
|
|
|
143
144
|
// 라이트 모드
|
|
144
145
|
const btnLight = createButton({
|
|
145
146
|
theme: 'light',
|
|
147
|
+
assistantUuid: 'your-assistant-uuid',
|
|
146
148
|
})
|
|
147
149
|
|
|
148
150
|
// 자동 모드 (시스템 설정 따름, 기본값)
|
|
149
151
|
const btnAuto = createButton({
|
|
150
152
|
theme: 'auto', // 또는 생략 가능
|
|
153
|
+
assistantUuid: 'your-assistant-uuid',
|
|
151
154
|
})
|
|
152
155
|
|
|
153
156
|
document.body.appendChild(btnDark)
|
|
@@ -163,6 +166,7 @@ document.body.appendChild(btnDark)
|
|
|
163
166
|
|
|
164
167
|
#### Parameters
|
|
165
168
|
|
|
169
|
+
- `options.assistantUuid` (string, **필수**): 어시스턴트 UUID
|
|
166
170
|
- `options.theme` (string, 선택): 테마 설정
|
|
167
171
|
- `'light'`: 라이트 모드
|
|
168
172
|
- `'dark'`: 다크 모드
|
|
@@ -178,6 +182,7 @@ document.body.appendChild(btnDark)
|
|
|
178
182
|
- 버튼 클릭 시 채팅 패널이 토글됩니다.
|
|
179
183
|
- 로그인이 필요한 경우 패널 내에서 직접 로그인할 수 있습니다.
|
|
180
184
|
- `theme`이 `'auto'`로 설정된 경우, 시스템의 다크모드 설정을 자동으로 감지하여 적용합니다.
|
|
185
|
+
- `assistantUuid`는 필수 파라미터이며, 채팅 기능을 사용하기 위해 반드시 제공되어야 합니다.
|
|
181
186
|
|
|
182
187
|
### React 컴포넌트: `OasisButton`
|
|
183
188
|
|
|
@@ -185,6 +190,7 @@ document.body.appendChild(btnDark)
|
|
|
185
190
|
|
|
186
191
|
```typescript
|
|
187
192
|
interface OasisButtonProps {
|
|
193
|
+
assistantUuid: string // 필수: 어시스턴트 UUID
|
|
188
194
|
theme?: 'light' | 'dark' | 'auto' // 기본값: 'auto'
|
|
189
195
|
}
|
|
190
196
|
```
|
|
@@ -195,6 +201,7 @@ interface OasisButtonProps {
|
|
|
195
201
|
|
|
196
202
|
```typescript
|
|
197
203
|
{
|
|
204
|
+
assistantUuid: string // 필수: 어시스턴트 UUID
|
|
198
205
|
theme?: 'light' | 'dark' | 'auto' // 기본값: 'auto'
|
|
199
206
|
}
|
|
200
207
|
```
|