mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 06:44:17 +00:00
add impl IntoStyle for Style (#2682)
This commit is contained in:
parent
b3db094618
commit
3d37f08539
1 changed files with 10 additions and 0 deletions
|
@ -46,6 +46,16 @@ pub trait IntoStyle {
|
|||
fn into_style_boxed(self: Box<Self>) -> Style;
|
||||
}
|
||||
|
||||
impl IntoStyle for Style {
|
||||
fn into_style(self) -> Style {
|
||||
self
|
||||
}
|
||||
|
||||
fn into_style_boxed(self: Box<Self>) -> Style {
|
||||
*self
|
||||
}
|
||||
}
|
||||
|
||||
impl IntoStyle for &'static str {
|
||||
#[inline(always)]
|
||||
fn into_style(self) -> Style {
|
||||
|
|
Loading…
Reference in a new issue