From 40cd3efceeefb7c8b0d8a671ea70d331563652b7 Mon Sep 17 00:00:00 2001 From: Leo dev Date: Thu, 19 Dec 2024 01:08:34 +0100 Subject: [PATCH] removed styling --- src/examples.rs | 6 +++--- src/lib.rs | 3 --- src/ui/mod.rs | 1 - 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/examples.rs b/src/examples.rs index f441e4d..a0d4bd8 100644 --- a/src/examples.rs +++ b/src/examples.rs @@ -18,11 +18,11 @@ pub mod counter_example { pub mod todo_example { use crate::prelude::*; - pub fn todo_app() -> Element { + pub fn app() -> Element { let todo = vec!["Todo", "Hovering", "Completed", "Foo", "Bar"]; rsx! { - @SetStyle(todo_styling()) + @SetStyle(styling()) text { class: "title", static "Todo list app made with OSUI" } text { class: "title", "{}", "-".repeat(crossterm::terminal::size().unwrap().0 as usize) } @@ -38,7 +38,7 @@ pub mod todo_example { } } - pub fn todo_styling() -> Css { + pub fn styling() -> Css { css! { "todo" { x: 0 px, diff --git a/src/lib.rs b/src/lib.rs index 6a35080..d8d0a06 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -160,9 +160,6 @@ impl Document { } pub fn render(&self) { if !self.element.is_null() { - // unsafe { - // (*self.element).set_styling(&self.css); - // } let (width, height) = crossterm::terminal::size().unwrap(); let mut frame = utils::Frame::new((0, 0), (width, height), &self.css); utils::clear(); diff --git a/src/ui/mod.rs b/src/ui/mod.rs index ba00bfd..2272adc 100644 --- a/src/ui/mod.rs +++ b/src/ui/mod.rs @@ -29,7 +29,6 @@ pub enum Instruction { #[elem_fn] #[derive(Default, Debug)] pub struct Div { - pub styling: Option>, pub instructions: Vec, }