LiveUiKit (LiveUIKit v0.1.2)
installation
Installation
If available in Hex, the package can be installed
by adding live_ui_kit
to your list of dependencies in mix.exs
:
def deps do
[
{:live_ui_kit, "~> 0.1.0"}
]
end
Include the library in one of two ways. Either in a specific LiveView file:
defmodule ExampleAppWeb.PageLive do
use ExampleAppWeb, :live_view
use LiveUiKit
# Other code
end
Or add this to the web module if you want to access it from all LiveView pages:
# app/example_app_web.ex
defmodule ExampleAppWeb do
# Other code
defp view_helpers do
quote do
use Phoenix.HTML
import Phoenix.LiveView.Helpers
import Phoenix.View
import ExampleAppWeb.ErrorHelpers
import ExampleAppWeb.Gettext
alias ExampleAppWeb.Router.Helpers, as: Routes
# ADD THIS
use LiveUiKit
end
end
end