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 4a42510 commit fb5debe
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 fb5debe

Please sign in to comment.