removed styling
This commit is contained in:
+3
-3
@@ -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,
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|||||||
@@ -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>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user