aboutsummaryrefslogtreecommitdiff
path: root/src/components/shared/flash_messages.cr
blob: bc44440d19243a3b56ee173e95c0baea5d9bdf72 (plain)
1
2
3
4
5
6
7
8
9
10
11
class Shared::FlashMessages < BaseComponent
  needs flash : Lucky::FlashStore

  def render
    flash.each do |flash_type, flash_message|
      div class: "flash-#{flash_type}", flow_id: "flash" do
        text flash_message
      end
    end
  end
end