devel #27
2 changed files with 6 additions and 2 deletions
|
@ -305,6 +305,8 @@ defmodule ChiyaWeb.CoreComponents do
|
|||
<.input name="my-input" errors={["oh no!"]} />
|
||||
"""
|
||||
attr :id, :any, default: nil
|
||||
attr :class, :string, default: nil
|
||||
|
||||
attr :name, :any
|
||||
attr :label, :string, default: nil
|
||||
attr :value, :any
|
||||
|
@ -391,6 +393,7 @@ defmodule ChiyaWeb.CoreComponents do
|
|||
"phx-no-feedback:border-gray-300 phx-no-feedback:focus:border-gray-400 phx-no-feedback:focus:ring-gray-800/5",
|
||||
"border-gray-300 focus:border-gray-400 focus:ring-gray-800/5",
|
||||
"dark:bg-gray-800 dark:text-gray-300 dark:border-gray-700 dark:focus:border-gray-400",
|
||||
@class,
|
||||
@errors != [] && "border-rose-400 focus:border-rose-400 focus:ring-rose-400/10"
|
||||
]}
|
||||
{@rest}
|
||||
|
@ -415,6 +418,7 @@ defmodule ChiyaWeb.CoreComponents do
|
|||
"phx-no-feedback:border-gray-300 phx-no-feedback:focus:border-gray-400 phx-no-feedback:focus:ring-gray-800/5",
|
||||
"border-gray-300 focus:border-gray-400 focus:ring-gray-800/5",
|
||||
"dark:bg-gray-800 dark:text-gray-300 dark:border-gray-700 dark:focus:border-gray-400",
|
||||
@class,
|
||||
@errors != [] && "border-rose-400 focus:border-rose-400 focus:ring-rose-400/10"
|
||||
]}
|
||||
{@rest}
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
options={Ecto.Enum.values(Chiya.Site.Setting, :theme)}
|
||||
/>
|
||||
<.input field={f[:user_agent]} type="text" label="User agent" />
|
||||
<.input field={f[:custom_css]} type="textarea" label="Custom css" />
|
||||
<.input field={f[:custom_html]} type="textarea" label="Custom html" />
|
||||
<.input field={f[:custom_css]} type="textarea" label="Custom css" class="font-mono" />
|
||||
<.input field={f[:custom_html]} type="textarea" label="Custom html" class="font-mono" />
|
||||
<.input field={f[:home_channel_id]} type="select" label="Home Channel" options={@channels} />
|
||||
<:actions>
|
||||
<.button>Save Setting</.button>
|
||||
|
|
Loading…
Reference in a new issue