Struct leptos_meta::StylesheetProps
source · pub struct StylesheetProps {
pub href: String,
pub id: Option<String>,
}
Expand description
Props for the Stylesheet
component.
Injects an HTMLLinkElement
into the document
head that loads a stylesheet from the URL given by the href
property.
use leptos::prelude::*;
use leptos_meta::*;
#[component]
fn MyApp() -> impl IntoView {
provide_meta_context();
view! {
<main>
<Stylesheet href="/style.css"/>
</main>
}
}
§Required Props
- href:
impl Into<String>
- The URL at which the stylesheet is located.
§Optional Props
- id:
impl Into<String>
- An ID for the stylesheet.
Fields§
§href: String
The URL at which the stylesheet is located.
id: Option<String>
An ID for the stylesheet.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StylesheetProps
impl RefUnwindSafe for StylesheetProps
impl Send for StylesheetProps
impl Sync for StylesheetProps
impl Unpin for StylesheetProps
impl UnwindSafe for StylesheetProps
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.