Give a visual indicator when the note is unsaved
This commit is contained in:
@@ -65,7 +65,11 @@ defmodule MusicLibraryWeb.NotesComponent do
|
|||||||
phx-submit="save"
|
phx-submit="save"
|
||||||
>
|
>
|
||||||
<.textarea
|
<.textarea
|
||||||
class="w-full min-h-128 md:min-h-164 overflow-scroll font-mono text-sm/4"
|
class={[
|
||||||
|
"w-full min-h-128 md:min-h-164 overflow-scroll font-mono",
|
||||||
|
@form[:content].value != @note.content &&
|
||||||
|
"border-amber-300 focus-visible:border-amber-300"
|
||||||
|
]}
|
||||||
field={@form[:content]}
|
field={@form[:content]}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user