Add some docs

This commit is contained in:
Mitchell Hanberg 2021-05-13 21:28:15 -04:00
parent 3b00fedb27
commit b2bd06d037
3 changed files with 4 additions and 1 deletions

View file

@ -18,7 +18,7 @@ def deps do
[
{:temple, "~> 0.6.0-rc.1"},
{:phoenix, ">= 1.5.0"}, # requires at least Phoenix v1.5.0
{:phoenix_live_ivew, github: "phoenixframework/phoenix_live_ivew"} # currently requires an unreleased version of phoenix_live_ivew if you are using live view
{:phoenix_live_ivew, github: "phoenixframework/phoenix_live_view"} # currently requires an unreleased version of phoenix_live_ivew if you are using live view
]
end
```

View file

@ -104,6 +104,7 @@ defmodule Temple do
defmacro __using__(_) do
quote location: :keep do
import Temple
require Temple.Component
end
end

View file

@ -6,6 +6,8 @@ defmodule Temple.Component do
Since component modules are view modules, the assigns you pass to the component are accessible via the `@` macro and the `assigns` variable.
You must `require Temple.Component` in your views that use components, as the `c` and `slot` generate markup that uses macros provided by Temple.
## Components
```elixir