Skip to content

Commit

Permalink
feat(demo): reduce font size of the chat assistant
Browse files Browse the repository at this point in the history
Reduce font size of the chat assistant window because of large messages
  • Loading branch information
mlopezFC committed Sep 13, 2024
1 parent b376c1a commit c6b251e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ public class ChatAssistantLazyLoadingDemo extends VerticalLayout {

public ChatAssistantLazyLoadingDemo() {
ChatAssistant chatAssistant = new ChatAssistant();
chatAssistant.setClassName("small");
Span lazyLoadingData = new Span();
DataProvider<Message,?> dataProvider = DataProvider.fromCallbacks(query->{
lazyLoadingData.setText("Loading messages from: " + query.getOffset() + ", with limit: " + query.getLimit());
Expand Down Expand Up @@ -170,4 +171,5 @@ public ChatAssistantLazyLoadingDemo() {

add(message, lazyLoadingData, chat, chatAssistant);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@
--chatbot-avatar-img: url(chatbot.png);
--chatbot-avatar-bg-color: white;
}

chat-bot.small vaadin-message {
font-size: var(--lumo-font-size-xxs);
}

0 comments on commit c6b251e

Please sign in to comment.