Current section
41 Versions
Jump to
Current section
41 Versions
Compare versions
6
files changed
+33
additions
-9
deletions
| @@ -20,6 +20,28 @@ This project brings [DaisyUI](https://daisyui.com/) components into your [Phoeni | |
| 20 20 | |
| 21 21 | <!-- MDOC --> |
| 22 22 | |
| 23 | + ### Installing it with mix archive installer |
| 24 | + |
| 25 | + ```bash |
| 26 | + mix archive.install hex daisy_ui_installer |
| 27 | + ``` |
| 28 | + |
| 29 | + In the Phoenix project folder |
| 30 | + |
| 31 | + ```bash |
| 32 | + mix daisy |
| 33 | + ``` |
| 34 | + |
| 35 | + Alternative, you can just install a single component |
| 36 | + |
| 37 | + ```bash |
| 38 | + mix daisy badge input |
| 39 | + ``` |
| 40 | + |
| 41 | + **_NOTE:_** This will install as well component dependencies which can be another components. |
| 42 | + |
| 43 | + ### Installing as a dependency |
| 44 | + |
| 23 45 | Reference this repository on your `mix.exs` file to start using. |
| 24 46 | |
| 25 47 | ```elixir |
| @@ -30,6 +52,8 @@ def deps do | |
| 30 52 | end |
| 31 53 | ``` |
| 32 54 | |
| 55 | + ### DaisyUI Assets |
| 56 | + |
| 33 57 | Add through `npm` the daisy UI package inside your phoenix application: |
| 34 58 | |
| 35 59 | ```bash |
| @@ -250,4 +274,4 @@ List of available components. | |
| 250 274 | - [x] Update components for the new [DaisyUI 5](https://daisyui.com/docs/upgrade/) |
| 251 275 | - [ ] Implement all components from DaisyUI with storybook |
| 252 276 | - [ ] Update documentation with the new Phoenix release |
| 253 | - - [ ] Create `mix` script to enable users to import the components of this library into their projects, sharing the same project namespace :planned |
| 277 | + - [x] Create `mix` script to enable users to import the components of this library into their projects, sharing the same project namespace |
| @@ -1,7 +1,7 @@ | |
| 1 1 | {<<"links">>, |
| 2 2 | [{<<"GitHub">>,<<"https://github.com/phcurado/daisy_ui_components">>}]}. |
| 3 3 | {<<"name">>,<<"daisy_ui_components">>}. |
| 4 | - {<<"version">>,<<"0.8.3">>}. |
| 4 | + {<<"version">>,<<"0.8.4">>}. |
| 5 5 | {<<"description">>,<<"DaisyUI component library for LiveView">>}. |
| 6 6 | {<<"elixir">>,<<"~> 1.14">>}. |
| 7 7 | {<<"app">>,<<"daisy_ui_components">>}. |
| @@ -60,8 +60,8 @@ defmodule DaisyUIComponents do | |
| 60 60 | import DaisyUIComponents.Icon |
| 61 61 | import DaisyUIComponents.Indicator |
| 62 62 | import DaisyUIComponents.Input |
| 63 | - import DaisyUIComponents.Join |
| 64 63 | import DaisyUIComponents.JSHelpers |
| 64 | + import DaisyUIComponents.Join |
| 65 65 | import DaisyUIComponents.Label |
| 66 66 | import DaisyUIComponents.List |
| 67 67 | import DaisyUIComponents.Loading |
| @@ -21,7 +21,7 @@ defmodule DaisyUIComponents.Progress do | |
| 21 21 | """ |
| 22 22 | attr :class, :any, default: nil |
| 23 23 | attr :color, :string, values: @colors |
| 24 | - attr :rest, :global |
| 24 | + attr :rest, :global, include: ~w(value max) |
| 25 25 | slot :inner_block |
| 26 26 | |
| 27 27 | def progress(assigns) do |
| @@ -13,8 +13,8 @@ defmodule DaisyUIComponents.Table do | |
| 13 13 | ## Examples |
| 14 14 | |
| 15 15 | <.table id="users" rows={@users}> |
| 16 | - <:col :let={user} label="id"><%= user.id %></:col> |
| 17 | - <:col :let={user} label="username"><%= user.username %></:col> |
| 16 | + <:col :let={user} label="id">{user.id}</:col> |
| 17 | + <:col :let={user} label="username">{user.username}</:col> |
| 18 18 | </.table> |
| 19 19 | |
| 20 20 | or declaring the table components |
| @@ -28,8 +28,8 @@ defmodule DaisyUIComponents.Table do | |
| 28 28 | </.thead> |
| 29 29 | <.tbody> |
| 30 30 | <.tr :for={user <- @users}> |
| 31 | - <.td><%= user.id %></.td> |
| 32 | - <.td><%= user.username %></.td> |
| 31 | + <.td>{user.id}</.td> |
| 32 | + <.td>{user.username}</.td> |
| 33 33 | </.tr> |
| 34 34 | </.tbody> |
| 35 35 | </.table> |
Loading more files…