diff --git a/.github/workflows/erb.yml b/.github/workflows/erb.yml index a084e68..133d2a2 100644 --- a/.github/workflows/erb.yml +++ b/.github/workflows/erb.yml @@ -17,5 +17,15 @@ jobs: ruby-version: ['3.4'] steps: - uses: actions/checkout@v4 - - name: herb + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + + - name: herb linter run: npx @herb-tools/linter app/components --no-color + + - name: herb analyzer + run: bundle exec herb analyze app/components diff --git a/app/components/flowbite/toast/toast.html.erb b/app/components/flowbite/toast/toast.html.erb index 39225ae..0460ab6 100644 --- a/app/components/flowbite/toast/toast.html.erb +++ b/app/components/flowbite/toast/toast.html.erb @@ -1,8 +1,8 @@ -
" - role="alert" - <%= options.map { |k, v| "#{k}=\"#{v}\"" }.join(" ").html_safe %> -> +<%= tag.div( + class: container_classes.join(" "), + role: "alert", + **options, +) do %> <%= render Flowbite::Toast::Icon.new(style: style) %>
<%= message %>
@@ -37,4 +37,4 @@ <% end %> -
+<% end %>