Merge pull request #1 from luoxiaozero/feat/leptos-v0.3

Feat/leptos v0.3
This commit is contained in:
luoxiaozero 2023-05-15 12:25:48 +08:00 committed by GitHub
commit 13df204940
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 11 deletions

View file

@ -13,12 +13,12 @@ license = "MIT"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
leptos = { version = "0.2.5", features = ["stable"] } leptos = { version = "0.3.0", features = ["stable"] }
stylers = "0.3.1" stylers = "0.3.1"
web-sys = { version = "0.3.61", features = ["DomRect"] } web-sys = { version = "0.3.62", features = ["DomRect"] }
leptos_dom = { version = "0.2.5" } leptos_dom = { version = "0.3.0" }
leptos-icons = { git = "https://github.com/Carlosted/leptos-icons.git", features = ["AiCloseOutlined", "AiCheckOutlined"] } leptos_icons = { version = "0.0.10", features = ["AiCloseOutlined", "AiCheckOutlined"] }
wasm-bindgen = "0.2.84" wasm-bindgen = "0.2.85"
[workspace] [workspace]
members = ["examples/basic"] members = ["examples/basic"]

View file

@ -6,6 +6,6 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
leptos = { version = "0.2.5", features = ["stable"] } leptos = { version = "0.3.0", features = ["stable"] }
melt-ui = { path = "../../" } melt-ui = { path = "../../" }
leptos-icons = { git = "https://github.com/Carlosted/leptos-icons.git", features = ["AiCloseOutlined", "AiCheckOutlined"] } leptos_icons = { version = "0.0.10", features = ["AiCloseOutlined", "AiCheckOutlined"] }

View file

@ -40,7 +40,7 @@ pub fn Button(
#[prop(optional, into)] type_: MaybeSignal<ButtonType>, #[prop(optional, into)] type_: MaybeSignal<ButtonType>,
#[prop(optional, into)] color: MaybeSignal<ButtonColor>, #[prop(optional, into)] color: MaybeSignal<ButtonColor>,
#[prop(optional, into)] round: MaybeSignal<bool>, #[prop(optional, into)] round: MaybeSignal<bool>,
#[prop(optional, into)] icon: Option<leptos_icons::Icon>, #[prop(optional, into)] icon: Option<IconData>,
#[prop(optional)] children: Option<Children>, #[prop(optional)] children: Option<Children>,
) -> impl IntoView { ) -> impl IntoView {
let theme = use_theme(cx, Theme::light); let theme = use_theme(cx, Theme::light);
@ -80,7 +80,7 @@ pub fn Button(
{ {
if let Some(icon) = icon { if let Some(icon) = icon {
view!{cx, view!{cx,
<LeptosIcon icon=icon style=icon_style/> <Icon icon=icon style=icon_style/>
}.into() }.into()
} else { } else {
None None

View file

@ -35,7 +35,7 @@ pub fn Checkbox(
move || { move || {
if checked.get() { if checked.get() {
view! {cx, view! {cx,
<LeptosIcon icon=AiIcon::AiCheckOutlined style="color: white"/> <Icon icon=AiIcon::AiCheckOutlined style="color: white"/>
}.into() }.into()
} else { } else {
None None

View file

@ -31,7 +31,7 @@ pub fn Modal(
cx, cx,
<> <>
<span style="cursor: pointer;" on:click=move |_| if let Some(on_cancel) = &on_cancel { on_cancel.set(())}> <span style="cursor: pointer;" on:click=move |_| if let Some(on_cancel) = &on_cancel { on_cancel.set(())}>
<LeptosIcon icon=AiIcon::AiCloseOutlined/> <Icon icon=AiIcon::AiCloseOutlined/>
</span> </span>
</> </>
} }