I’m confused by the discussion of the global attribute discussion at https://hexdocs.pm/phoenix_live_view/Phoenix.Component.html#module-attributes. The following example is given:
attr :message, :string, required: true
attr :rest, :global
def notification(assigns) do
~H"""
<span {@rest}><%= @message %></span>
"""
end
An example of the use of the function component is then given:
<.notification message="You've got mail!" class="bg-green-200" phx-click="close" />
Which would be rendered as:
<span class="bg-green-200" phx-click="close">You've got mail!</span>
Will the symbol :rest always be the designated global attribute? I suspect not.
Would someone mind giving just a bit more explanation and possibly an example where something other than :rest is given as a global attribute?