Current section
41 Versions
Jump to
Current section
41 Versions
Compare versions
17
files changed
+197
additions
-19
deletions
| @@ -1,5 +1,5 @@ | |
| 1 1 | [ |
| 2 2 | plugins: [Phoenix.LiveView.HTMLFormatter], |
| 3 | - import_deps: [:phoenix, :assert_html], |
| 3 | + import_deps: [:phoenix], |
| 4 4 | inputs: ["*.{heex,ex,exs}", "{config,lib,test}/**/*.{heex,ex,exs}"] |
| 5 5 | ] |
| @@ -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.0">>}. |
| 4 | + {<<"version">>,<<"0.8.1">>}. |
| 5 5 | {<<"description">>,<<"DaisyUI component library for LiveView">>}. |
| 6 6 | {<<"elixir">>,<<"~> 1.14">>}. |
| 7 7 | {<<"app">>,<<"daisy_ui_components">>}. |
| @@ -39,6 +39,17 @@ defmodule DaisyUIComponents.Badge do | |
| 39 39 | """ |
| 40 40 | end |
| 41 41 | |
| 42 | + @doc """ |
| 43 | + |
| 44 | + Returns the classes for a badge based on the provided parameters. |
| 45 | + |
| 46 | + ## Parameters |
| 47 | + |
| 48 | + - assigns - a map containing various options to customize the badge, including color, ghost, outline, size, and additional classes. |
| 49 | + ## Description |
| 50 | + Constructs a list of CSS classes for styling a badge. |
| 51 | + |
| 52 | + """ |
| 42 53 | def badge_classes(assigns) do |
| 43 54 | classes([ |
| 44 55 | "badge", |
| @@ -10,7 +10,24 @@ defmodule DaisyUIComponents.Card do | |
| 10 10 | @modifiers ~w(side image_full) |
| 11 11 | @placements ~w(top bottom) |
| 12 12 | |
| 13 | + @doc """ |
| 14 | + |
| 15 | + Returns the modifiers of the card component. |
| 16 | + |
| 17 | + ## Description |
| 18 | + Retrieves a fixed list of all possible modifiers. |
| 19 | + |
| 20 | + """ |
| 13 21 | def modifiers, do: @modifiers |
| 22 | + |
| 23 | + @doc """ |
| 24 | + |
| 25 | + Returns the placements of the card component. |
| 26 | + |
| 27 | + ## Description |
| 28 | + Retrieves a fixed list of all possible placements. |
| 29 | + |
| 30 | + """ |
| 14 31 | def placements, do: @placements |
| 15 32 | |
| 16 33 | attr :class, :any, default: nil |
| @@ -189,10 +189,9 @@ defmodule DaisyUIComponents.Form do | |
| 189 189 | color={@color} |
| 190 190 | class={[@class, "w-full"]} |
| 191 191 | prompt={@prompt} |
| 192 | + value={Phoenix.HTML.Form.normalize_value(@type, @value)} |
| 192 193 | {@rest} |
| 193 | - > |
| 194 | - {Phoenix.HTML.Form.normalize_value(@type, @value)} |
| 195 | - </.input> |
| 194 | + /> |
| 196 195 | <.error :for={msg <- @errors}>{msg}</.error> |
| 197 196 | </.fieldset> |
| 198 197 | """ |
Loading more files…