forked from lookbook-hq/lookbook
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(*): rename preview examples to scenarios
- Loading branch information
1 parent
929ff42
commit c7da213
Showing
69 changed files
with
440 additions
and
476 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<%= lookbook_render :code, line_numbers: true, full_height: true do -%> | ||
<% if examples.many? -%> | ||
<% examples.each do |example| -%><%== "<!-- #{example.label} -->\n#{example.output}\n\n" -%><% end %> | ||
<% if scenarios.many? -%> | ||
<% scenarios.each do |scenario| -%><%== "<!-- #{scenario.label} -->\n#{scenario.output}\n\n" -%><% end %> | ||
<%- else -%> | ||
<%== examples.first.output -%> | ||
<%== scenarios.first.output -%> | ||
<%- end %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
<div class="h-full"> | ||
<% if examples.many? %> | ||
<%= lookbook_render :code, language: examples.first.source_lang[:name], line_numbers: true, full_height: true do -%> | ||
<%- examples.each.with_index(1) do |example, i| -%> | ||
<%== "#{sprintf example.source_lang[:comment], example.label}\n#{example.source}\n#{"\n" if i < examples.size}" %><% end %> | ||
<% if scenarios.many? %> | ||
<%= lookbook_render :code, language: scenarios.first.source_lang[:name], line_numbers: true, full_height: true do -%> | ||
<%- scenarios.each.with_index(1) do |scenario, i| -%> | ||
<%== "#{sprintf scenario.source_lang[:comment], scenario.label}\n#{scenario.source}\n#{"\n" if i < scenarios.size}" %><% end %> | ||
<% end %> | ||
<% else %> | ||
<% example = examples.first %> | ||
<%= lookbook_render :code, language: example.source_lang[:name], line_numbers: true, full_height: true do %><%== example.source %><% end %> | ||
<% scenario = scenarios.first %> | ||
<%= lookbook_render :code, language: scenario.source_lang[:name], line_numbers: true, full_height: true do %><%== scenario.source %><% end %> | ||
<% end %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
<% if examples.many? %> | ||
<%# Render a group of examples %> | ||
<% examples.each do |example| %> | ||
<% if scenarios.many? %> | ||
<%# Render a group of scenarios %> | ||
<% scenarios.each do |scenario| %> | ||
<div style="margin-bottom: 30px !important; display: block !important;"> | ||
<h6 style="all: unset; display: block; color: #999; font-family: sans-serif; font-size: 14px; margin-top: 0; margin-bottom: 10px;"> | ||
<%= example.label %> | ||
<%= scenario.label %> | ||
</h6> | ||
<%= example.output %> | ||
<%= scenario.output %> | ||
</div> | ||
<% end %> | ||
<% else %> | ||
<%# Render a single example %> | ||
<%= examples.first.output %> | ||
<%# Render a single scenario %> | ||
<%= scenarios.first.output %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
id: render-target-entity | ||
label: RenderTargetEntity | ||
title: RenderTargetEntity | ||
layout: api | ||
subject: render_target_entity | ||
--- |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
id: rendered-scenario-entity | ||
label: RenderedScenarioEntity | ||
title: RenderedScenarioEntity | ||
layout: api | ||
subject: rendered_scenario_entity | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
id: scenario-entity | ||
label: ScenarioEntity | ||
title: ScenarioEntity | ||
layout: api | ||
subject: scenario_entity | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
id: scenario-group-entity | ||
label: ScenarioGroupEntity | ||
title: ScenarioGroupEntity | ||
layout: api | ||
subject: scenario_group_entity | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.