|
@@ -5,12 +5,12 @@ use super::*;
|
|
///
|
|
///
|
|
///
|
|
///
|
|
/// # Example
|
|
/// # Example
|
|
-/// ```rust, no_run
|
|
|
|
|
|
+/// ```rust
|
|
/// # use dioxus::prelude::*;
|
|
/// # use dioxus::prelude::*;
|
|
/// fn RedBackground() -> Element {
|
|
/// fn RedBackground() -> Element {
|
|
/// rsx! {
|
|
/// rsx! {
|
|
/// document::Stylesheet {
|
|
/// document::Stylesheet {
|
|
-/// src: asset!("/assets/style.css")
|
|
|
|
|
|
+/// href: asset!("/assets/style.css")
|
|
/// }
|
|
/// }
|
|
/// }
|
|
/// }
|
|
/// }
|
|
/// }
|
|
@@ -22,9 +22,8 @@ use super::*;
|
|
///
|
|
///
|
|
/// </div>
|
|
/// </div>
|
|
#[component]
|
|
#[component]
|
|
-pub fn Stylesheet(props: LinkProps, src: Option<String>) -> Element {
|
|
|
|
|
|
+pub fn Stylesheet(props: LinkProps) -> Element {
|
|
super::Link(LinkProps {
|
|
super::Link(LinkProps {
|
|
- href: src.or_else(|| props.href.clone()),
|
|
|
|
rel: Some("stylesheet".into()),
|
|
rel: Some("stylesheet".into()),
|
|
r#type: Some("text/css".into()),
|
|
r#type: Some("text/css".into()),
|
|
..props
|
|
..props
|