Sha256: 1268bcb6f09066fb00e9e2d02cdfcb85e246183bae2441804cc8696b7fdc2fc7

Contents?: true

Size: 1.68 KB

Versions: 24

Compression:

Stored size: 1.68 KB

Contents

<%= render component_tag(x: {
  data: "appAlert",
  show: "!dismissed",
  bind: "root",
  cloak: true
}, class: {
  "with-title": title?,
  "vivid": vivid?
}) do %>
  <div class="alert-container">
    <div class="alert-icon" data-role="icon">
      <%= icon %>  
    </div>
    
    <div class="alert-body">
      <div class="alert-content" data-role="content">
        <% if title? %>
          <h4 class="alert-title"><%= title %></h4>
        <% end %>

        <p class="alert-message"<% if single_line? %> x-dimensions="checkSingleLineWrap(dimensions)"<% end %>>
          <%= content %>
        </p>

        <% if link? %>
          <div class="alert-link" data-role="link">
            <%= link %>
          </div>
        <% end %>
      </div>

      <% if action? || secondary_action? %>
        <div class="alert-actions">
          <% if action? %>
            <div class="alert-action"
              x-ref="action"
              @click="dismiss"
              data-role="action">
              <%= action %>
            </div>
          <% end %>

          <% if secondary_action? %>
            <div class="alert-action"
              x-ref="secondaryAction"
              @click="dismiss"
              data-role="secondary-action">
              <%= secondary_action %>
            </div>
          <% end %>
        </div>
      <% end %>
    </div>

    <% if dismissable? %>
      <div
        class="alert-dismiss"
        x-ref="dismiss"
        data-role="dismiss">
        <%= coco_button(
          icon: :x,
          size: :sm,
          theme: :blank,
          class: "alert-dismiss-button",
          click: "$parent.dismiss()"
        ) %>
      </div>
    <% end %>
  </div>
<% end %>

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
coveragebook_components-0.7.9 app/components/coco/app/elements/alert/alert.html.erb
coveragebook_components-0.7.8 app/components/coco/app/elements/alert/alert.html.erb
coveragebook_components-0.7.7 app/components/coco/app/elements/alert/alert.html.erb
coveragebook_components-0.7.6 app/components/coco/app/elements/alert/alert.html.erb
coveragebook_components-0.7.5 app/components/coco/app/elements/alert/alert.html.erb
coveragebook_components-0.7.4 app/components/coco/app/elements/alert/alert.html.erb
coveragebook_components-0.7.3 app/components/coco/app/elements/alert/alert.html.erb
coveragebook_components-0.7.2 app/components/coco/app/elements/alert/alert.html.erb
coveragebook_components-0.7.1 app/components/coco/app/elements/alert/alert.html.erb
coveragebook_components-0.7.0 app/components/coco/app/elements/alert/alert.html.erb
coveragebook_components-0.6.5 app/components/coco/app/elements/alert/alert.html.erb
coveragebook_components-0.6.4 app/components/coco/app/elements/alert/alert.html.erb
coveragebook_components-0.6.3 app/components/coco/app/elements/alert/alert.html.erb
coveragebook_components-0.6.2 app/components/coco/app/elements/alert/alert.html.erb
coveragebook_components-0.6.1 app/components/coco/app/elements/alert/alert.html.erb
coveragebook_components-0.6.0 app/components/coco/app/elements/alert/alert.html.erb
coveragebook_components-0.5.7 app/components/coco/app/elements/alert/alert.html.erb
coveragebook_components-0.5.6 app/components/coco/app/elements/alert/alert.html.erb
coveragebook_components-0.5.5 app/components/coco/app/elements/alert/alert.html.erb
coveragebook_components-0.5.4 app/components/coco/app/elements/alert/alert.html.erb