-
Notifications
You must be signed in to change notification settings - Fork 22
03_QuickStart
- Open VsCode and choose Settings , then search
Slint:Library Paths
- Choose edit in settings.json
- Find
slint.libraryPaths
and add"SurrealismUI":"parent_file_path\\surrealism-ui\\index.slint"
❗
"slint.libraryPaths": {
"SurrealismUI":"E:\\test_try\\test-surrealism\\ui\\modules\\surrealism-ui\\index.slint"
},
import { STag,SCard,SInput,SText,SButton } from "./modules/surrealism-ui/index.slint";
export component App inherits Window {
height: 600px;
width: 800px;
title: "Surrealism";
Rectangle {
VerticalLayout {
padding: 20px;
spacing: 60px;
SText {
height: 3rem;
text: "SurrealismUI";
}
SButton {
text: "Try SurrealismUI";
}
SCard {
STag{
theme: Warning;
text:"test tag";
}
}
Rectangle {
SInput{
theme: Primary;
placeholder :"please enter your username";
card-width:300px;
clearable: true;
text:"SurrealismUI - input";
accepted(res)=>{
debug("content in input:" + res);
}
changed(change-res)=>{
debug(change-res);
}
}
}
}
}
}