1786048673
This commit is contained in:
42
ui/components/component_card.slint
Normal file
42
ui/components/component_card.slint
Normal file
@@ -0,0 +1,42 @@
|
||||
// Copyright © SixtyFPS GmbH <info@slint.dev>
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import {
|
||||
MaterialText,
|
||||
OutlinedCard,
|
||||
MaterialTypography,
|
||||
MaterialStyleMetrics
|
||||
} from "../material.slint";
|
||||
|
||||
export component ComponentCard {
|
||||
in property <string> title;
|
||||
|
||||
HorizontalLayout {
|
||||
alignment: center;
|
||||
|
||||
VerticalLayout {
|
||||
spacing: 4px;
|
||||
alignment: start;
|
||||
|
||||
MaterialText {
|
||||
horizontal_alignment: center;
|
||||
text: root.title;
|
||||
style: MaterialTypography.title_medium;
|
||||
}
|
||||
|
||||
OutlinedCard {
|
||||
min-width: 360px;
|
||||
|
||||
VerticalLayout {
|
||||
padding_left: 2px;
|
||||
padding_right: self.padding_left;
|
||||
padding_top: MaterialStyleMetrics.padding_8;
|
||||
padding_bottom: self.padding_top;
|
||||
spacing: MaterialStyleMetrics.spacing_8;
|
||||
|
||||
@children
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user