Skip to content

Commit

Permalink
docs(loader): add additional details for Rails Loader component
Browse files Browse the repository at this point in the history
  • Loading branch information
kajabi-bot committed Oct 17, 2023
1 parent 80051fc commit eefa3ac
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 23 deletions.
57 changes: 38 additions & 19 deletions docs/app/views/examples/components/loader/_preview.html.erb
Original file line number Diff line number Diff line change
@@ -1,29 +1,48 @@
<h2 class="<%= SageClassnames::TYPE::HEADING_6 %>">Without text</h2>
<div class="sage-row">
<div class="sage-col--md-6 example__block--lg">
<h2>Variants</h2>

<h3>Bar</h3>
<%= sage_component SageGridRow, {} do %>
<%= sage_component SageGridCol, { size: 12, css_classes: "example__block--lg" } do %>
<%= sage_component SageLoader, {
type: "spinner"
type: "bar"
} %>
</div>
<div class="sage-col--md-6 example__block--lg">
<%= sage_component SageLoader, {
type: "success"
} %>
</div>
</div>
<hr>
<h2 class="<%= SageClassnames::TYPE::HEADING_6 %>">With text</h2>
<div class="sage-row">
<div class="sage-col--md-6 example__block--lg">
<% end %>
<% end %>

<%= sage_component SageDivider, {} %>

<h3>Spinner</h3>
<%= sage_component SageGridRow, {} do %>
<%= sage_component SageGridCol, { size: 6, css_classes: "example__block--lg" } do %>
<h2 class="<%= SageClassnames::TYPE::HEADING_6 %>">With text</h2>
<%= sage_component SageLoader, {
type: "spinner",
text: true
} %>
</div>
<div class="sage-col--md-6 example__block--lg">
<% end %>
<%= sage_component SageGridCol, { size: 6, css_classes: "example__block--lg" } do %>
<h2 class="<%= SageClassnames::TYPE::HEADING_6 %>">Without text</h2>
<%= sage_component SageLoader, {
type: "spinner"
} %>
<% end %>
<% end %>

<%= sage_component SageDivider, {} %>

<h3>Success</h3>
<%= sage_component SageGridRow, {} do %>
<%= sage_component SageGridCol, { size: 6, css_classes: "example__block--lg" } do %>
<h2 class="<%= SageClassnames::TYPE::HEADING_6 %>">With text</h2>
<%= sage_component SageLoader, {
type: "success",
text: true
} %>
</div>
</div>
<% end %>
<%= sage_component SageGridCol, { size: 6, css_classes: "example__block--lg" } do %>
<h2 class="<%= SageClassnames::TYPE::HEADING_6 %>">Without text</h2>
<%= sage_component SageLoader, {
type: "success"
} %>
<% end %>
<% end %>
15 changes: 11 additions & 4 deletions docs/app/views/examples/components/loader/_props.html.erb
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
<tr>
<td><%= md('`type`') %><%= sage_component SageBadge, { color: "published", value: "required" } %></td>
<td><%= md('Determines which loader will be used; `spinner` or `success`') %></td>
<td><%= md('String') %></td>
<td><%= md('`nil`') %></td>
<td><%= md('`fill`') %>
<td><%= md('If true, will fill the space within the container.') %></td>
<td><%= md('Boolean') %></td>
<td><%= md('`false`') %></td>
</tr>
<tr>
<td><%= md('`text`') %></td>
<td><%= md('Includes text that aligns with the loader.') %></td>
<td><%= md('Boolean') %></td>
<td><%= md('`false`') %></td>
</tr>
<tr>
<td><%= md('`type`') %><%= sage_component SageBadge, { color: "published", value: "required" } %></td>
<td><%= md('Determines which loader will be used; `bar`, `spinner` or `success`') %></td>
<td><%= md('String') %></td>
<td><%= md('`nil`') %></td>
</tr>

0 comments on commit eefa3ac

Please sign in to comment.