Add some docs
This commit is contained in:
parent
3b00fedb27
commit
b2bd06d037
|
@ -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
|
||||
```
|
||||
|
|
|
@ -104,6 +104,7 @@ defmodule Temple do
|
|||
defmacro __using__(_) do
|
||||
quote location: :keep do
|
||||
import Temple
|
||||
require Temple.Component
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Reference in a new issue