removed styling

This commit is contained in:
2024-12-19 01:08:34 +01:00
parent 8fd17e8195
commit 40cd3efcee
3 changed files with 3 additions and 7 deletions
+3 -3
View File
@@ -18,11 +18,11 @@ pub mod counter_example {
pub mod todo_example { pub mod todo_example {
use crate::prelude::*; use crate::prelude::*;
pub fn todo_app() -> Element { pub fn app() -> Element {
let todo = vec!["Todo", "Hovering", "Completed", "Foo", "Bar"]; let todo = vec!["Todo", "Hovering", "Completed", "Foo", "Bar"];
rsx! { rsx! {
@SetStyle(todo_styling()) @SetStyle(styling())
text { class: "title", static "Todo list app made with OSUI" } text { class: "title", static "Todo list app made with OSUI" }
text { class: "title", "{}", "-".repeat(crossterm::terminal::size().unwrap().0 as usize) } 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! { css! {
"todo" { "todo" {
x: 0 px, x: 0 px,
-3
View File
@@ -160,9 +160,6 @@ impl Document {
} }
pub fn render(&self) { pub fn render(&self) {
if !self.element.is_null() { if !self.element.is_null() {
// unsafe {
// (*self.element).set_styling(&self.css);
// }
let (width, height) = crossterm::terminal::size().unwrap(); let (width, height) = crossterm::terminal::size().unwrap();
let mut frame = utils::Frame::new((0, 0), (width, height), &self.css); let mut frame = utils::Frame::new((0, 0), (width, height), &self.css);
utils::clear(); utils::clear();
-1
View File
@@ -29,7 +29,6 @@ pub enum Instruction {
#[elem_fn] #[elem_fn]
#[derive(Default, Debug)] #[derive(Default, Debug)]
pub struct Div { pub struct Div {
pub styling: Option<std::collections::HashMap<StyleName, Style>>,
pub instructions: Vec<Instruction>, pub instructions: Vec<Instruction>,
} }