Sha256: 6d82dc288842ee83e682fcf56fa69ba2c32714dc18b22b9945ad5b5ecbd5c2e5

Contents?: true

Size: 927 Bytes

Versions: 4

Compression:

Stored size: 927 Bytes

Contents

<%= render Primer::BaseComponent.new(**@kwargs) do %>
  <% if @icon.present? %>
    <%= render(Primer::OcticonComponent.new(
      icon: @icon,
      size: @icon_size,
      classes: "blankslate-icon"
    )) %>
  <% end %>

  <% if @image_src.present? && @image_alt.present? %>
    <%= image_tag "#{@image_src}", class: "mb-3", size: "56x56", alt: "#{@image_alt}" %>
  <% end %>

  <% if @title.present? %>
    <%= render Primer::BaseComponent.new(tag: @title_tag, mb: 1) do %><%= @title %><% end %>
  <% end %>

  <% if @description.present? %>
    <p><%= @description %></p>
  <% end %>

  <%= content %>

  <% if @button_text.present? && @button_url.present? %>
    <a class="btn <%= @button_classes %>" href="<%= @button_url %>"><%= @button_text %></a>
  <% end %>

  <% if @link_text.present? && @link_url.present? %>
    <p>
      <%= link_to "#{@link_url}" do %><%= @link_text %><% end %>
    </p>
  <% end %>
<% end %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
primer_view_components-0.0.12 app/components/primer/blankslate_component.html.erb
primer_view_components-0.0.11 app/components/primer/blankslate_component.html.erb
primer_view_components-0.0.10 app/components/primer/blankslate_component.html.erb
primer_view_components-0.0.9 app/components/primer/blankslate_component.html.erb