8000 Added popup-logo-svg and popup-logo-url to engineering docs by kirill-makarov-crescendo · Pull Request #3 · enegelai/documentation · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Added popup-logo-svg and popup-logo-url to engineering docs #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions docs/documentation/bots/enable-bot.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ You can pass the following parameters to Bot Widget:
| bot-id | ID of your bot. |
| logo-svg | Your Logo icon (svg) |
| logo-url | Your Logo URL. Use either `logo-svg`, or `logo-url`. |
| popup-logo-svg | The Logo used for the widget popup (do not use with popup-logo-url) |
| popup-logo-url | The Logo used for the widget popup (do not use with popup-logo-svg) |
| bot-icon-svg | Icon to use for messages from Bot |
| user-icon-svg | Icon to use for messages from User |
| system-icon-svg | Icon to use for system messages |
Expand Down Expand Up @@ -67,6 +69,27 @@ Here is an example how to customize logo:
<!-- Enegel.ai bot widget end -->
```

Here is an example of how to customize the popup logo:

```html
<!-- Enegel.ai bot widget begin -->
<link href="https://unpkg.com/@enegelai/bot-widget/dist/enegelaibot.css" rel="stylesheet">
<script src="https://unpkg.com/@enegelai/bot-widget/dist/enegelaibot.umd.js" type="text/javascript" async></script>
<script>
(function() {
let el = document.createElement('enegelai-bot');
el.setAttribute('name', '');
el.setAttribute('url', '<service URL>');
el.setAttribute('org-id', '<your Org Id>');
el.setAttribute('bot-id', '<your Bot Id>');
// In this example we will use the 'popup-logo-svg', alternatively you can use 'popup-logo-url' with a link to your logo
el.setAttribute('popup-logo-svg', '<svg height="20px" viewBox="0 0 140 40" fill="none" xmlns="http://www.w3.org/2000/svg"><title>Crescendo Logo</title><text x="0" y="30" font-family="Arial, sans-serif" font-weight="bold" font-size="25" fill="#6927da">crescendo</text></svg>');
document.body.appendChild(el);
})();
</script>
<!-- Enegel.ai bot widget end -->
```

## Customizing appearance

You can use CSS variables to customize appearance of certain elements of the Bot Widget.
Expand Down
0