Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lookbook/previews/op_primer/inline_macro_component_preview.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ def playground(text: "InlineMacroComponent", icon: nil)
end
end

def loading_content
render_with_template
end

def with_link
render_with_template
end
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<p>
When the content is not fully loaded yet, best use a spinner and muted text to indicate it:

<%= render(OpPrimer::InlineMacroComponent.new) do |c| %>
<% c.with_leading_visual_icon(icon: :book) %>

<%= render(Primer::Beta::Spinner.new(size: :small, display: :flex, mr: 2, sr_text: "")) %>
<%= render(Primer::Beta::Text.new(color: :muted)) { "Loading…" } %>
<% end %>
</p>
Loading