Closed BrooklinJazz closed 7 months ago
So the nature of this is completely changing in v0.3.0. Instead of per-component or per-liveview stylesheets you have one global stylsheet for the entire app. It is now a function component:
defmodule MyAppWeb.Layouts.SwiftUI do
use LiveViewNative.Component
embed_templates "layouts_swiftui/**/*"
embed_stylesheet MyAppWeb.AppStyles
end
this embeds the compiled stylesheet into the module as a function component:
# function component
MyAppWeb.Layouts.SwiftUI.stylesheet(%{})
# debug purposes structured AST
MyAppWeb.Layouts.SwiftUI.__stylesheet_ast__()
I'd love to be able to separate my stylesheets and use them within the same module like so:
However, currently this results in not finding the corresponding function in the stylesheet: