update stylying for dims

This commit is contained in:
timothycarambat 2024-05-08 14:10:24 -07:00
parent ab63385a59
commit 59ce715515
5 changed files with 12 additions and 11 deletions

View File

@ -87,9 +87,9 @@ REQUIRED data attributes:
- `data-assistant-icon` - Set the icon of the chat assistant.
- `data-window-height` - Set the chat window height in pixels.
- `data-window-height` - Set the chat window height. **must include CSS suffix:** `px`,`%`,`rem`
- `data-window-width` - Set the chat window width in pixels.
- `data-window-width` - Set the chat window width. **must include CSS suffix:** `px`,`%`,`rem`
- `data-text-size` - Set the text size of the chats in pixels.

View File

@ -1,5 +1,6 @@
<!doctype html>
<html lang="en">
<body>
<h1>This is an example testing page for embedded AnythingLLM.</h1>
<!--
@ -8,4 +9,5 @@
</script>
-->
</body>
</html>
</html>

View File

@ -27,12 +27,12 @@ export default function App() {
};
const position = embedSettings.position || "bottom-right";
const windowHeight = embedSettings.windowHeight
? `md:max-h-[${embedSettings.windowHeight}px]`
: "md:max-h-[700px]";
const windowWidth = embedSettings.windowWidth
? `md:max-w-[${embedSettings.windowWidth}px]`
? `md:max-w-[${embedSettings.windowWidth}]`
: "md:max-w-[400px]";
const windowHeight = embedSettings.windowHeight
? `md:max-h-[${embedSettings.windowHeight}]`
: "md:max-h-[700px]";
return (
<>

View File

@ -13,7 +13,6 @@ const HistoricalMessage = forwardRef(
{ uuid = v4(), message, role, sources = [], error = false, sentAt },
ref
) => {
console.log("text size", embedderSettings.settings.textSize);
const textSize = !!embedderSettings.settings.textSize
? `text-[${embedderSettings.settings.textSize}px]`
: "text-sm";

View File

@ -23,9 +23,9 @@ const DEFAULT_SETTINGS = {
position: "bottom-right", // position of chat button/window
assistantName: "AnythingLLM Chat Assistant", // default assistant name
assistantIcon: null, // default assistant icon
windowHeight: null, // height of chat window in px
windowWidth: null, // width of chat window in px
textSize: null, // text size in px
windowHeight: null, // height of chat window in number:css-prefix
windowWidth: null, // width of chat window in number:css-prefix
textSize: null, // text size in px (number only)
// behaviors
openOnLoad: "off", // or "on"