summaryrefslogtreecommitdiff
path: root/src/types/props.rs
diff options
context:
space:
mode:
authorpml68 <contact@pml68.me>2024-09-03 21:55:34 +0200
committerpml68 <contact@pml68.me>2024-09-22 23:55:11 +0200
commite8792ea151e0c26fd3497a09446f1b846df1c87c (patch)
tree3aed2ad399ae78fd6ead35c3d71906f0dbe31b71 /src/types/props.rs
parentfeat: format children nodes into code (without props) (diff)
downloadiced-builder-e8792ea151e0c26fd3497a09446f1b846df1c87c.tar.gz
feat: finish codegen for elements **without** props
feat: wow
Diffstat (limited to 'src/types/props.rs')
-rw-r--r--src/types/props.rs44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/types/props.rs b/src/types/props.rs
new file mode 100644
index 0000000..6dbb0a4
--- /dev/null
+++ b/src/types/props.rs
@@ -0,0 +1,44 @@
+use core::f32;
+
+use iced::{
+ alignment::{Horizontal, Vertical},
+ widget::text::Shaping,
+ Alignment, ContentFit, Font, Length, Padding,
+};
+pub struct Props {
+ pub align_items: Option<Alignment>,
+ pub align_x: Option<Horizontal>,
+ pub align_y: Option<Vertical>,
+ pub horizontal_alignment: Option<Horizontal>,
+ pub vertical_alignment: Option<Vertical>,
+ pub width: Option<Length>,
+ pub height: Option<Length>,
+ pub max_width: Option<f32>,
+ pub max_height: Option<f32>,
+ pub font: Option<Font>,
+ pub padding: Option<Padding>,
+ pub spacing: Option<f32>,
+ pub content_fit: Option<ContentFit>,
+ pub shaping: Option<Shaping>,
+}
+
+impl Default for Props {
+ fn default() -> Self {
+ Self {
+ align_items: None,
+ align_x: None,
+ align_y: None,
+ horizontal_alignment: None,
+ vertical_alignment: None,
+ width: None,
+ height: None,
+ max_width: None,
+ max_height: None,
+ font: None,
+ padding: None,
+ spacing: None,
+ content_fit: None,
+ shaping: None,
+ }
+ }
+}