@asgard-js/react 0.0.43-canary.11 → 0.0.43-canary.14
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/chatbot/api-key-input/api-key-input.d.ts.map +1 -1
- package/dist/context/asgard-theme-context.d.ts +2 -0
- package/dist/context/asgard-theme-context.d.ts.map +1 -1
- package/dist/index.js +7610 -7608
- package/package.json +1 -1
- package/src/components/chatbot/api-key-input/api-key-input.tsx +2 -3
- package/src/context/asgard-theme-context.tsx +7 -0
package/package.json
CHANGED
|
@@ -28,7 +28,6 @@ export function ApiKeyInput({
|
|
|
28
28
|
const [showPassword, setShowPassword] = useState(false);
|
|
29
29
|
const { chatbot } = useAsgardThemeContext();
|
|
30
30
|
const { avatar } = useAsgardContext();
|
|
31
|
-
console.log('chatbot', chatbot);
|
|
32
31
|
|
|
33
32
|
const handleSubmit = (e: FormEvent): void => {
|
|
34
33
|
e.preventDefault();
|
|
@@ -118,8 +117,8 @@ export function ApiKeyInput({
|
|
|
118
117
|
[styles.loading]: loading,
|
|
119
118
|
})}
|
|
120
119
|
style={{
|
|
121
|
-
backgroundColor: chatbot?.
|
|
122
|
-
color: chatbot?.
|
|
120
|
+
backgroundColor: chatbot?.mainColor,
|
|
121
|
+
color: chatbot?.secondaryColor,
|
|
123
122
|
}}
|
|
124
123
|
>
|
|
125
124
|
{loading ? 'Loading...' : 'Continue'}
|
|
@@ -31,6 +31,8 @@ export interface AsgardThemeContextValue {
|
|
|
31
31
|
backgroundColor?: CSSProperties['backgroundColor'];
|
|
32
32
|
borderColor?: CSSProperties['borderColor'];
|
|
33
33
|
inactiveColor?: CSSProperties['color'];
|
|
34
|
+
mainColor?: CSSProperties['color'];
|
|
35
|
+
secondaryColor?: CSSProperties['color'];
|
|
34
36
|
primaryComponent?: {
|
|
35
37
|
mainColor?: CSSProperties['color'];
|
|
36
38
|
secondaryColor?: CSSProperties['color'];
|
|
@@ -267,6 +269,9 @@ export function AsgardThemeContextProvider(
|
|
|
267
269
|
chatbot: {
|
|
268
270
|
backgroundColor: themeFromAnnotations.chatbot?.backgroundColor,
|
|
269
271
|
borderColor: themeFromAnnotations.chatbot?.borderColor,
|
|
272
|
+
mainColor: themeFromAnnotations.chatbot?.primaryComponent?.mainColor,
|
|
273
|
+
secondaryColor: themeFromAnnotations.chatbot?.primaryComponent?.secondaryColor,
|
|
274
|
+
|
|
270
275
|
header: {
|
|
271
276
|
style: {
|
|
272
277
|
borderBottomColor: themeFromAnnotations.chatbot?.borderColor,
|
|
@@ -407,6 +412,8 @@ export function AsgardThemeContextProvider(
|
|
|
407
412
|
chatbot: {
|
|
408
413
|
backgroundColor: propsTheme.chatbot?.backgroundColor,
|
|
409
414
|
borderColor: propsTheme.chatbot?.borderColor,
|
|
415
|
+
mainColor: propsTheme.chatbot?.primaryComponent?.mainColor,
|
|
416
|
+
secondaryColor: propsTheme.chatbot?.primaryComponent?.secondaryColor,
|
|
410
417
|
header: {
|
|
411
418
|
style: {
|
|
412
419
|
borderBottomColor: propsTheme.chatbot?.borderColor,
|