feat: relative style paths & component crate example

This commit is contained in:
Yiffy Dev 2024-11-16 22:32:38 +05:00 • committed by spushk
commit a13d592b20
Signed by: spushk
GPG key ID: 7797B761E105E8AA

View file

@ -4,6 +4,7 @@ use leptos_router::{
components::{Route, Router, Routes},
StaticSegment,
};
use sabry::styly;
use crate::routes;
@ -29,7 +30,7 @@ pub fn shell(options: LeptosOptions) -> impl IntoView {
pub fn App() -> impl IntoView {
provide_meta_context();
view! {
view! {class=APP,
<Stylesheet id="leptos" href="/pkg/leptos-axum.css"/>
<Title text="Welcome to Leptos"/>
<Router>
@ -41,3 +42,11 @@ pub fn App() -> impl IntoView {
</Router>
}
}
styly!(app:scss {"
@use 'theme';
main {
@include theme.surface(primary);
}
"});