added border and more attributes
This commit is contained in:
1 parent
7a1fdeb673
commit
f6ef9981dd
7 files changed
+745
-115
No files matched your search
@@ -0,0 +1,30 @@
|
||||
use dioxus::prelude::*;
|
||||
|
||||
fn main() {
|
||||
rink::launch(app);
|
||||
}
|
||||
|
||||
fn app(cx: Scope) -> Element {
|
||||
let (radius, set_radius) = use_state(&cx, || 0);
|
||||
|
||||
cx.render(rsx! {
|
||||
div {
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
justify_content: "center",
|
||||
align_items: "center",
|
||||
background_color: "hsl(248, 53%, 58%)",
|
||||
onwheel: move |w| set_radius((radius + w.delta_y as i8).abs()),
|
||||
|
||||
// the border can either be solid, double, thick, OR rounded
|
||||
// if multable are set only the last style is appiled
|
||||
// to skip a side set the style to none
|
||||
border_style: "solid none solid double",
|
||||
border_width: "thick",
|
||||
border_radius: "{radius}px",
|
||||
border_color: "#0000FF #FF00FF #FF0000 #00FF00",
|
||||
|
||||
"{radius}"
|
||||
}
|
||||
})
|
||||
}
|
||||
+26
-7
@@ -53,13 +53,6 @@ fn app(cx: Scope) -> Element {
|
||||
"zib"
|
||||
"zib"
|
||||
"zib"
|
||||
"zib"
|
||||
"zib"
|
||||
"zib"
|
||||
"zib"
|
||||
"zib"
|
||||
"zib"
|
||||
"zib"
|
||||
}
|
||||
p {
|
||||
background_color: "yellow",
|
||||
@@ -77,6 +70,32 @@ fn app(cx: Scope) -> Element {
|
||||
background_color: "cyan",
|
||||
"asd"
|
||||
}
|
||||
div {
|
||||
font_weight: "bold",
|
||||
color: "#666666",
|
||||
p{
|
||||
"bold"
|
||||
}
|
||||
p {
|
||||
font_weight: "normal",
|
||||
" normal"
|
||||
}
|
||||
}
|
||||
p {
|
||||
font_style: "italic",
|
||||
color: "red",
|
||||
"italic"
|
||||
}
|
||||
p {
|
||||
text_decoration: "underline",
|
||||
color: "rgb(50, 100, 255)",
|
||||
"underline"
|
||||
}
|
||||
p {
|
||||
text_decoration: "line-through",
|
||||
color: "hsl(10, 100%, 70%)",
|
||||
"line-through"
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user