aboutsummaryrefslogtreecommitdiff
path: root/azalea-chat/src/base_component.rs
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2021-12-15 23:10:55 -0600
committermat <github@matdoes.dev>2021-12-15 23:10:55 -0600
commit9642558f8f8d983a7087f15d68be8cf07a85f0c2 (patch)
tree5f0a967f005cd5db510a13ab290c8ad6669b25aa /azalea-chat/src/base_component.rs
parent72aefe871ca4983431b1a0b707b472e73ffea836 (diff)
downloadazalea-drasl-9642558f8f8d983a7087f15d68be8cf07a85f0c2.tar.xz
azalea
Diffstat (limited to 'azalea-chat/src/base_component.rs')
-rw-r--r--azalea-chat/src/base_component.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/azalea-chat/src/base_component.rs b/azalea-chat/src/base_component.rs
new file mode 100644
index 00000000..fa39a11c
--- /dev/null
+++ b/azalea-chat/src/base_component.rs
@@ -0,0 +1,23 @@
+use crate::{component::Component, style::Style};
+
+#[derive(Clone, Debug)]
+pub struct BaseComponent {
+ // implements mutablecomponent
+ pub siblings: Vec<Component>,
+ pub style: Style,
+}
+
+impl BaseComponent {
+ pub fn new() -> Self {
+ Self {
+ siblings: Vec::new(),
+ style: Style::default(),
+ }
+ }
+}
+
+impl Default for BaseComponent {
+ fn default() -> Self {
+ Self::new()
+ }
+}