Experiments with slint
This commit is contained in:
16
ui/chat-view.slint
Normal file
16
ui/chat-view.slint
Normal file
@@ -0,0 +1,16 @@
|
||||
import { Button, VerticalBox, ScrollView } from "std-widgets.slint";
|
||||
import { Message } from "message.slint";
|
||||
|
||||
export component ChatView inherits ScrollView {
|
||||
in property <[{text: string, sender: string, time: string}]> messages;
|
||||
|
||||
VerticalLayout {
|
||||
spacing: 5px;
|
||||
|
||||
for message in root.messages: Message {
|
||||
text: message.text;
|
||||
sender: message.sender;
|
||||
time: message.time;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user