Skip to content

Allow overrides for flash message styles #491

@sevenseacat

Description

@sevenseacat

When using views that set flash messages, eg. resettable - the styling of the flash messages should be customizable to fit with the rest of the app.

At the moment these are hardcoded here -

class="fixed top-2 right-2 mr-2 w-80 sm:w-96 z-50 rounded-lg p-3 text-sm
bg-emerald-100 dark:bg-emerald-200 text-emerald-800"
role="alert"
phx-click="lv:clear-flash"
phx-value-key="info"
>
<%= Phoenix.Flash.get(@flash, :info) %>
</p>
<% end %>
<%= if Phoenix.Flash.get(@flash, :error) do %>
<p
class="fixed top-2 right-2 mr-2 w-80 sm:w-96 z-50 rounded-lg p-3 text-sm
bg-rose-100 dark:bg-rose-200 text-rose-900"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions