Skip to content

Commit

Permalink
fix input story
Browse files Browse the repository at this point in the history
  • Loading branch information
phcurado committed Jul 17, 2024
1 parent 16a3e58 commit b03e8a3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
defmodule Storybook.CoreComponents.Input do
defmodule Storybook.CoreComponents.Form do
use PhoenixStorybook.Story, :component
alias DaisyUIComponentsSiteWeb.CoreComponents

def function, do: &CoreComponents.input/1
alias DaisyUIComponents.Form
alias DaisyUIComponents.CoreComponents

def function, do: &Form.form_input/1
def imports, do: [{CoreComponents, [simple_form: 1]}]

def template do
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
defmodule Storybook.CoreComponents.Header do
use PhoenixStorybook.Story, :component
alias DaisyUIComponentsSiteWeb.CoreComponents

alias DaisyUIComponents.Button
alias DaisyUIComponents.CoreComponents

def function, do: &CoreComponents.header/1
def imports, do: [{CoreComponents, button: 1}]
def imports, do: [{Button, button: 1}]

def variations do
[
Expand Down
4 changes: 2 additions & 2 deletions lib/daisy_ui_components/form.ex
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ defmodule DaisyUIComponents.Form do
## Examples
<.input field={@form[:email]} type="email" />
<.input name="my-input" errors={["oh no!"]} />
<.form_input field={@form[:email]} type="email" />
<.form_input name="my-input" errors={["oh no!"]} />
"""
attr :id, :any, default: nil
attr :name, :any
Expand Down

0 comments on commit b03e8a3

Please sign in to comment.