Skip to content

Commit

Permalink
Update snippet examples
Browse files Browse the repository at this point in the history
  • Loading branch information
peterszerzo committed Feb 8, 2024
1 parent fb59562 commit e599833
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
10 changes: 7 additions & 3 deletions packages/website/src/components/ChatConfiguration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,15 +200,19 @@ const RadioList = <T extends unknown>({
return (
<div className="space-y-1">
{options.map((option) => (
<label key={option.label} className="flex items-center space-x-2">
<label
key={option.label}
className="flex items-center justify-start space-x-2"
>
<input
className="flex-shrink max-w-[60px]"
type="radio"
checked={option.value === selected}
onChange={() => {
onChange(option.value);
}}
/>{" "}
<p className="text-sm text-gray-800">{option.label}</p>
/>
<p className="text-sm flex-grow text-gray-800">{option.label}</p>
</label>
))}
</div>
Expand Down
2 changes: 1 addition & 1 deletion packages/website/src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const version = "0.0.9";
export const version = "0.0.14";

export const umdScriptTags = {
chatCore: `https://unpkg.com/@nlxai/chat-core@${version}/lib/umd/index.js`,
Expand Down
2 changes: 2 additions & 0 deletions packages/website/src/snippets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ storeIn: "localStorage",
? indentBy(
" ",
`
// CUSTOM BEHAVIOR SNIPPET
${sendWelcomeOnTimeoutSnippet}
// CUSTOM BEHAVIOR SNIPPET END`,
Expand All @@ -181,6 +182,7 @@ export const sendWelcomeOnTimeoutSnippet = `setTimeout(() => {
const conversationHandler = widget.getConversationHandler();
if (conversationHandler) {
conversationHandler.sendIntent("MyCustomIntent");
widget.expand();
}
}, 16000);`;

Expand Down

0 comments on commit e599833

Please sign in to comment.