programandoarg/pg_rails

View on GitHub
pg_engine/app/components/alert_component.html.slim

Summary

Maintainability
Test Coverage
/ El mt-2 es necesario para que en modo sticky (FlashContainerComponent)
/ no quede pegado al borde superior
.alert.mt-2.d-inline-block[
  class=@klass
  data-bs-autohide="true"
  aria-live="assertive" aria-atomic="true" role="alert"
]
  .d-flex.align-items-center
    .bi class=icon_class

    = content

    - if @dismissible
      button(type="button" class="btn-close"
             data-bs-dismiss="alert" aria-label="Close")