Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typo fixes #174

Merged
merged 2 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ defmodule MyAppWeb.HelloLive do
end

# liv/my_app_web/live/hello_live_swiftui.ex
def MyAppWeb.HelloLive.SwiftUI do
defmodule MyAppWeb.HelloLive.SwiftUI do
use MyAppNative, [:render_component, format: :swiftui]

def render(assigns, %{"target" => "watchos"}) do
Expand Down
2 changes: 1 addition & 1 deletion lib/live_view_native.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ defmodule LiveViewNative do
Phoenix on how to handle certain formats.

# registers each plugin for use
config :live_view_native plugins: [
config :live_view_native, plugins: [
LiveViewNative.SwiftUI,
LiveViewNative.Jetpack
]
Expand Down
8 changes: 4 additions & 4 deletions lib/live_view_native/component.ex
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ defmodule LiveViewNative.Component do
See `LiveViewNative.Renderer.embed_templates/2` for more information.

## Format-Specific Render Component
def MyAppWeb.HomeLive.SwiftUI do
defmodule MyAppWeb.HomeLive.SwiftUI do
use LiveViewNative.Component,
format: :swiftui,
as: :render
end

In this example `:as` is used and this will inject following:

ember_templates("swiftui/home_live*", root: nil, name: :render)
embed_templates("swiftui/home_live*", root: nil, name: :render)

Assuming there is a `swiftui/home_live.swiftui.neex` this will be embeded in the render
component as `render/2`.
Expand All @@ -74,7 +74,7 @@ defmodule LiveViewNative.Component do
end

## Format-Specific Function Component
def MyAppWeb.NativeComponent.SwiftUI do
defmodule MyAppWeb.NativeComponent.SwiftUI do
use LiveViewNative.Component,
format: :swiftui
end
Expand All @@ -97,7 +97,7 @@ defmodule LiveViewNative.Component do
end

## Format-Specific Layouts
def MyAppWeb.Layouts.SwiftUI do
defmodule MyAppWeb.Layouts.SwiftUI do
use LiveViewNative.Component,
format: :swiftui

Expand Down
2 changes: 1 addition & 1 deletion lib/live_view_native/live_view.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule LiveViewNative.LiveView do
defmodule MyAppWeb.HomeLive do
use MyAppWeb, :live_view
use LiveViewNative,
formats: [:swiftui, :jatpack],
formats: [:swiftui, :jetpack],
layouts: [
swiftui: {MyAppWeb.Layouts.SwiftUI, :app},
jetpack: {MyAppWeb.Layouts.Jetpack, :app}
Expand Down
Loading